Leap year coding issue (perhaps) - Printable Version +- Atozed Forums (https://www.atozed.com/forums) +-- Forum: Atozed Software Products (https://www.atozed.com/forums/forum-1.html) +--- Forum: IntraWeb (https://www.atozed.com/forums/forum-3.html) +---- Forum: English (https://www.atozed.com/forums/forum-16.html) +----- Forum: IntraWeb General Discussion (https://www.atozed.com/forums/forum-4.html) +----- Thread: Leap year coding issue (perhaps) (/thread-1492.html) |
Leap year coding issue (perhaps) - msgopala - 01-16-2020 Seattle10 Intraweb 15.0.23 FastReports 5.0 TMS Intraweb PRO Components Raize 6.2.1 Has anybody encountered a leap year issue while using IncYear function for dates. I have a problem where if the start date is 12/30/19 or 12/31/2019 and I use the IncYear function to auto populate the end date to 12/30/2020 or 12/31/2020 then the application does not submit. Dates before and after work fine i.e 12/29/2019 and 01/01/2020 get the end date and the application submits the users request. I have tested it several times and end up with the same results. Appreciate any hekp I can get. For now we are handling these situations manually but I'm intrigued by this situationa dn the only thing I can think would cause this problem would be that 2020 is a leap year. Thoughts? Thanks RE: Leap year coding issue (perhaps) - kudzu - 01-17-2020 IW doenst parse dates AFAIK as a data type during submit and you also have a lot of 3P components involved. You will need to narrow it down a bit as to where it gets stuck or if there are any errors. RE: Leap year coding issue (perhaps) - Alexandre Machado - 01-20-2020 (01-16-2020, 03:42 PM)msgopala Wrote: Seattle10 Did you test the same in a simple VCL application? I'm not sure if there is a bug in IncYear() in Delphi 10 Seattle, but nothing is impossible.... RE: Leap year coding issue (perhaps) - MrSpock - 01-20-2020 Delphi has a built-in function if IsLeapYear(2000) then also you can use try DateToStr; StrToDate except correct the date according to your needs by adding or substracting one day end RE: Leap year coding issue (perhaps) - kudzu - 01-20-2020 Could this be related to your issue? https://www.youtube.com/watch?v=D3jxx8Yyw1c |