delphi 中怎么知道某一个月有多少天
if (month in (1,3,5,7,8,10,12))
return 31;
else if (month in(4,6,9,11))
return 30;
else if (year 是闰年)
return 29;
else
return 28;
闰年的算法
((year mod 4 = 0) and (year mod 100 <> 0)) or (year mod 400 = 0)
delphi 中怎么知道某一个月有多少天的更多相关文章
- Python 日历模块calendar.monthrange 获取某一个月有多少天
import calendar monthRange = calendar.monthrange(2018, 10) (0, 31) 输出的是一个元组: 第一个元素,数字0是这个月的第一天是星期天(上 ...
- sqlserver 获取一个月有多少天
--思路:给定日期的下一个月的1号减去1天,然后取datepart(DAY,dt) declare @dt varchar(10)select @dt='2013-11-20'select datep ...
- JS: 如何计算一个月有多少天
转自:https://www.2cto.com/kf/201806/755776.html 1 function getCountDays() { var curDate = new Date(); ...
- java计算一个月有多少天和多少周
import java.util.Calendar; /** * 功能概述:计算指定年月的天数和周数<br> * 创建时间:2010-5-17 下午05:25:58<br> * ...
- delphi 中如何访问另一个类中到私有方法?(转载)
原始连接 http://rvelthuis.blogspot.tw/2018/01/accessing-private-methods-of-another.html Accessing privat ...
- java 计算一个月有多少天和多少周
import java.util.Calendar; /** * 功能概述:计算指定年月的天数和周数<br> */ public class Test{ public static voi ...
- JavaScript中如何获取某年某月有多少天的问题
function getDaysInOneMonth(year, month){ month = parseInt(month,10); var d= new Date(year,month,0); ...
- Delphi中的THashTable
在Delphi中,Inifiles单元中有一个TStringHash的类,不过它的Value仅支持Integer(其实也不是问题,有其它类型可以将变量变为Pointer),有点不舒服,今天没事做就把它 ...
- 转:Delphi中使用比较少的一些语法
http://www.cnblogs.com/Murphieston/p/5577836.html 本文是为了加强记忆而写,这里写的大多数内容都是在编程的日常工作中使用频率不高的东西,但是又十分重要. ...
随机推荐
- 完全自制的五子棋人机对战游戏(VC++实现)
五子棋工作文档 1说明: 这个程序在创建初期的时候是有一个写的比较乱的文档的,但是很可惜回学校的时候没有带回来……所以现在赶紧整理一下,不然再过一段时间就忘干净了. 最初这个程序是受老同学所托做的,一 ...
- 蒙特罗卡π算法(C++语言描述)
圆的面积计算公式为:S=π*r*r 将圆放到一个直角坐标系中,如图黄色部分的面积是S/4=(π*r*r)/4;如果我们将取一个单位圆,则S/4=π/4. 因为是单位圆,半径为1,所以图中红色正方形的面 ...
- ccnu-线段树-单点更新3-C
C - 单点更新3 Time Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64u Submit Status Des ...
- ERP
企业资源计划即 ERP (Enterprise Resource Planning),由美国 Gartner Group 公司于1990年提出.企业资源计划是 MRP II(企业制造资源计划)下一代的 ...
- JSON(3)Google解析Json库Gson
本文参考 : http://www.cnblogs.com/chenlhuaf/archive/2011/05/01/gson_test.html 1.资料 官网: http://groups.goo ...
- CF 314C Sereja and Subsequences(树状数组)
题目链接:http://codeforces.com/problemset/problem/314/C 题意:给定一个数列a.(1)写出a的不同的所有非下降子列:(2)定义某个子列的f值为数列中各个数 ...
- .NET_Framework_version_history
http://en.wikipedia.org/wiki/.NET_Framework_version_history
- leetcode:Count and Say
The count-and-say sequence is the sequence of integers beginning as follows:1, 11, 21, 1211, 111221, ...
- leetcode:Rotate Array
Rotate an array of n elements to the right by k steps. For example, with n = 7 and k = 3, the array ...
- jboss jndi配置部分参数详解
使用的是jboss7.1.1, jndi的配置在$JBOSS_HOME/standalone/configuration/standalone.xml中进行配置.配置jndi时有很多参数,解释下用到的 ...