delphi中计算指定日期是该月第几周的函数

  • Post author:
  • Post category:其他






NthDayOfWeek


计算并返回指定日期是该月第几周







Unit:



DateUtils



function

NthDayOfWeek(

const

AValue: TDateTime): Word;



Example:




Uses


SysUtils

,

DateUtils

;





Begin



Write

(


‘Today is the ‘


,

NthDayOfWeek

(

Today

)


,


‘-th ‘


)


;


Writeln

(

formatdateTime

(


‘dddd’


,

Today

)


,


‘ of the month.’


)


;




End



.




版权声明:本文为nhconch原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。