<?php
functionyearMonthDays($year,$month){
if(in_array($month,array(1,3,5,7,8,01,03,05,07,08,10,12))){
return‘31‘;
}elseif($month==2){
if($year%400==0||($year%4==0&&$year%100!==0)){//判断是否是闰年
return‘29‘;
}else{
return‘28‘;
}..
分类:
Web程序 时间:
2014-08-05 23:02:31
阅读次数:
490
下面是脚本之家为大家整理的一些格式化时间日期的函数代码,需要的朋友可以参考下。代码如下:Date.prototype.format = function(format){var o = {"M+" : this.getMonth()+1, //month"d+" : this.getDate(), ...
分类:
Web程序 时间:
2014-08-05 22:22:04
阅读次数:
220
String
Problem Description
You hava a non-empty string which consists of lowercase English letters and may contain at most one '?'. Let's choose non-empty substring G from S (it can be G = S...
分类:
其他好文 时间:
2014-08-05 19:29:50
阅读次数:
240
select left(convert(varchar,getdate(),21),7)select convert(varchar(7),getdate(),120)year(time)+'-'+month(time)
分类:
数据库 时间:
2014-08-05 19:12:59
阅读次数:
364
1,从时间戳中解析出年月日时分秒: time为时间戳: var timestr = new Date(parseInt(time) * 1000); var year = timestr.getFullYear(); var month = timestr.getMonth()+1; var...
分类:
Web程序 时间:
2014-08-05 18:24:09
阅读次数:
233
gedit /etc/bashrc
shell环境下默认的特殊符号意义:
\d :代表日期,格式为weekday month date,例如:"Sun Sep 18"
\H :完整的主机名称。例如:我的机器名称为:redhat.linux,则这个名称就是fc4.linux
\h :仅取主机的第一个名字,如上例,则为redhat.linux,.linux则被省略
\t :显示时间为...
分类:
系统相关 时间:
2014-08-05 15:59:09
阅读次数:
657
今天码代码的时候遇到了这个问题,因为oracle用的比较少,所在查询了一下。顿时傻眼,有很多的贴子说是因为nls_date_language的问题,还要改会话级的NLS_DATE_LANGUAGE设置为简体中文,还有些别的,等等。我当时就无语了,我觉得大部分楼主都是在自己玩玩oracle的吧,虽然也算是因素,但如果是在正经项目中,谁会让你去改这种东西?!后来发现了正确的做法,如下:to_date(...
分类:
其他好文 时间:
2014-08-05 15:58:59
阅读次数:
320
The Most Wanted LetterYou are given a text, which contains different english letters and punctuation symbols. You should find the most frequent letter...
分类:
其他好文 时间:
2014-08-05 10:41:10
阅读次数:
276
需要注意的是,将Okular设置为打开PDF的默认程序后,为了能够双击打开具有中文文件名的PDF文档,需要将Windows系统的locale设置为Simplified Chinese。否则,照自己之前“病态”的心理将Windows的locale设置为English,则中文文件名无法被识别——不过,从...
intmonth=0;scanf("%d",&month);switch(month){case1:case3:case5:case7:case8:case10:case12:printf("%d月31天",month);break;case4:case6:case9:case11:printf("%d月30天",month);break;case2:printf("%d月29天",month);break;default:break;}return0;
分类:
其他好文 时间:
2014-08-01 23:21:42
阅读次数:
440