Judging leap year, common year, 28 days, 29 days calculation method, give the beginning of the month, stop year month, judge the number of days in a year February, and automatically calculate

Source: Internet
Author: User

              

{starting from month to day enquiry} if(Strtoint (Trim (adoquery_temp). fieldvalues['Qiyue']))=2) and(Strtoint (Trim (adoquery_temp). fieldvalues['Qiri']))= in) Then begin ifDaysinamonth (Strtoint (Trim (Edit_niandu). Text)),2)= - Then beginKaishiriqi:=inttostr (Strtoint (Trim (Edit_niandu). Text)) +'-'+trim (adoquery_temp. fieldvalues['Qiyue'])+'-'+' -' End Else beginKaishiriqi:=inttostr (Strtoint (Trim (Edit_niandu). Text)) +'-'+trim (adoquery_temp. fieldvalues['Qiyue'])+'-'+trim (adoquery_temp. fieldvalues['Qiri']); End; End; if(Strtoint (Trim (adoquery_temp). fieldvalues['Qiyue'])) <>2) and(Strtoint (Trim (adoquery_temp). fieldvalues['Qiri'])) <> in) Then beginKaishiriqi:=inttostr (Strtoint (Trim (Edit_niandu). Text)) +'-'+trim (adoquery_temp. fieldvalues['Qiyue'])+'-'+trim (adoquery_temp. fieldvalues['Qiri']); End; {Monthly Stop Date} if(Strtoint (Trim (adoquery_temp). fieldvalues['Zhiyue']))=2) and(Strtoint (Trim (adoquery_temp). fieldvalues['Zhiri']))= in) Then begin //Query Month number of months in the month //Swiss Year ifDaysinamonth (Strtoint (Trim (Edit_niandu). Text)),2)= - Then beginJieshuriqi:=inttostr (Strtoint (Trim (Edit_niandu). Text)) +1)+'-'+trim (adoquery_temp. fieldvalues['Zhiyue'])+'-'+' -'; End //Common year Else beginJieshuriqi:=inttostr (Strtoint (Trim (Edit_niandu). Text)) +1)+'-'+trim (adoquery_temp. fieldvalues['Zhiyue'])+'-'+trim (adoquery_temp. fieldvalues['Zhiri']); End; End Else begin if(Strtoint (Trim (adoquery_temp). fieldvalues['Qiyue']))=1) and(Strtoint (Trim (adoquery_temp). fieldvalues['Qiri']))=1) Then beginJieshuriqi:=inttostr (Strtoint (Trim (Edit_niandu). Text)) +'-'+' A'+'-'+' to'; End Else beginJieshuriqi:=inttostr (Strtoint (Trim (Edit_niandu). Text)) +1)+'-'+trim (adoquery_temp. fieldvalues['Zhiyue'])+'-'+trim (adoquery_temp. fieldvalues['Zhiri']); End; End;











Judging leap year, common year, 28 days, 29 days calculation method, give the beginning of the month, stop year month, judge the number of days in a year February, and automatically calculate

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.