# -*- 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…
一.两个日期大小比较 1.日期参数格式:yyyy-mm-dd // a: 日期a, b: 日期b, flag: 返回的结果 function duibi(a, b,flag) { var arr = a.split("-"); var starttime = new Date(arr[0], arr[1], arr[2]); var starttimes = starttime.getTime(); var arrs = b.split("-"); var endT…