Tag: 日期预览模式: 普通 | 列表
08-12
09

Calendar获取本月或本周日期

1.在计算自然周时  cal.roll(Calendar.DAY_OF_YEAR, -(n - 2)); 导致计算自然周最后一天周日统计时,搜索的范围是下一周的时间段

2.年月日由于没有转化date型,而是直接写的sql所以“2007-9-7”没有匹配“2007-09-07”

private String andDate(String sql, String limit) {
   if (limit != null && !"".equals(limit)) {
    Calendar cal = Calendar.getInstance();
    String month_str = "";
    String day_str = "";

查看更多...

Tags: Calendar 日期

分类:Java&Jsp | 固定链接 | 评论: 0 | 引用: 0 | 查看次数: 678
08-06
19

速度超快的日期选择程序(二),类似phpAdmin

把以下代码存为:calendar.js
-------------------代码开始------------------------
document.write("<div id=meizzCalendarLayer style='position: absolute; z-index: 9999; width: 144; height: 193; display: none'>");
document.write("<iframe name=meizzCalendarIframe scrolling=no frameborder=0 width=100% height=100%></iframe></div>");
function writeIframe()
{
    var strIframe = "<html><head><meta http-equiv='Content-Type' content='text/html; charset=gb2312'><style>"+
    "*{font-size: 12px; font-family: 宋体}"+
    ".bg{  color: "+ WebCalendar.lightColor +"; cursor: default; background-color: "+ WebCalendar.darkColor +";}"+

查看更多...

Tags: 日期 选择 phpAdmin

分类:Ajax/Js | 固定链接 | 评论: 1 | 引用: 0 | 查看次数: 995
08-06
19

日期选择程序(一)

maorr_calendar.js
/*=======Calendar.js==============*/  
  
var months = new Array("一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月");    
var daysInMonth = new Array(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);    
var days = new Array("日","一","二","三","四","五","六");    
var today;    
  
document.writeln("<div id='Calendar' style='position:absolute; z-index:1; visibility: hidden; filter:\"progid:DXImageTransform.Microsoft.Shadow(direction=135,color=#999999,strength=3)\"'></div>");  

查看更多...

Tags: 日期 选择

分类:Ajax/Js | 固定链接 | 评论: 0 | 引用: 0 | 查看次数: 548
07-12
07

有关SimpleDateFormat的常用方法说明

首先说明一下关键的参数

  G 年代标志符
  y 年
  M 月
  d 日
  h 时 在上午或下午 (1~12)
  H 时 在一天中 (0~23)
  m 分

查看更多...

Tags: SimpleDateFormat 格式化 时间 日期

分类:学习 | 固定链接 | 评论: 0 | 引用: 0 | 查看次数: 485
06-11
19

日期的格式化问题

<%@  page  import="java.util.Date"  import="java.text.SimpleDateFormat"%>  
Date  m_date  =  new  Date();  
SimpleDateFormat  smpDateFormat=new  SimpleDateFormat("yyyy-mm-dd");  
String  buf=smpDateFormat.format(m_date);  

查看更多...

Tags: 日期 格式化

分类:学习 | 固定链接 | 评论: 0 | 引用: 0 | 查看次数: 511