<script language="JavaScript" type="text/javascript"> function GetDateStr(AddDayCount) { var dd = new Date(); dd.setDate(dd.getDate()+AddDayCount);//获取AddDayCount天后的日期 var y = dd.getYear(); var m = dd.getMonth()+1;//获取当前月份的日期 var
获取当前的日期时间 格式“yyyy-MM-dd HH:MM:SS” function getNowFormatDate() { var date = new Date(); var seperator1 = "-"; var seperator2 = ":"; var month = date.getMonth() + 1; var strDate = date.getDate(); if (month >= 1 && month <=
SELECT CURRENT_DATE - (DAYOFWEEK(CURRENT_DATE) - 2 + (ROW_NUMBER() OVER (ORDER BY 1) ) ) DAY AS result FROM SYSIBM.SYSCOLUMNS fetch first 7 rows only; 输出结果: 2013-03-24 2013-03-23 2013-03-22 2013-03-21 2013-03-20 2013-03-19 2013-03-18 你可以看情况, 自己再做一下排序
function fun_date(aa){ var date1 = new Date(), time1=date1.getFullYear()+"-"+(date1.getMonth()+1)+"-"+date1.getDate();//time1表示当前时间 var date2 = new Date(date1); date2.setDate(date1.getDate()+aa); var time2 = date2.getFullYear()+"-
# -*- coding: utf-8 -*- '''获取当前日期前后N天或N月的日期''' from time import strftime, localtime from datetime import timedelta, date import calendar year = strftime("%Y",localtime()) mon = strftime("%m",localtime()) day = strftime("%d",l
# -*- coding: utf- -*- '''获取当前日期前后N天或N月的日期''' from time import strftime, localtime from datetime import timedelta, date import calendar year = strftime("%Y",localtime()) mon = strftime("%m",localtime()) day = strftime("%d",lo
Learn From:http://blog.csdn.net/sunhuwh/article/details/39161323 public class CalendarTest { public static void main(String[] args) { // 获取当前年份.月份.日期 Calendar cale = null; cale = Calendar.getInstance(); int year = cale.get(Calendar.YEAR); int month =