计算多少天前的具体时间.比如今天是9月5日,那7天前正常就是8月29了. 之前曾经直接用时间进行加减,吃了大亏,后来脑残到直接写了一个很复杂的计算闰年,闰月,30.31.28的月份 现在分享一下. function InitDateTime(day) { var nowDate = new Date() var agoDate = new Date(nowDate); var nowDay = nowDate.getDate(); var day = -day + nowDay; agoDate
实现下划线及颜色设置: public class AtActivity extends Activity { LinearLayout ll; /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setC