Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
Posted: Tue Feb 22, 2011 11:21 am Post subject:
radkrish82 wrote:
I got it atlast by converting Greg date to Julian and subtracting Julian by the number of days and then convert it back to Greg date. It works fine.
Thanks.
Glad you figured it out. However make sure that you validated the dates when subtraction of Julian date results in 0 or a negative value.(ex: Jan 1- Jan 18th dates) You need to check if the prior year is a leap year and perform the arithmetic accordingly. Good Luck _________________ Kolusu
www.linkedin.com/in/kolusu
Thanks, Kolusu. We got this requirement only on this month and started running from this month. Next year, we will be running from Jan month. Hence problem didnt arrived for this year. For sure, it would had given wrong results next year.
I need to add the leap year fix asap. Thanks for your help, Kolusu.
This is what is known as a "time bomb". . . With insufficient testing, you may have many of these buried about. . . They might not all be related to leap year.
Everything insufficiently tested is possibly just waiting to cause damage/disruption . . .
Which will usually happen at the worst possible time. . . _________________ All the best,
di
Last edited by papadi on Thu Feb 24, 2011 2:53 pm; edited 2 times in total
Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
Posted: Thu Feb 24, 2011 1:18 am Post subject:
radkrish82 wrote:
Thanks, Kolusu. We got this requirement only on this month and started running from this month. Next year, we will be running from Jan month. Hence problem didnt arrived for this year. For sure, it would had given wrong results next year.
I need to add the leap year fix asap. Thanks for your help, Kolusu.
Wow don't you test for all the possible scenarios? on second thoughts it is basic testing of the data. Just because you did not have the test data , you assumed that it would work? _________________ Kolusu
www.linkedin.com/in/kolusu
well, I agree. yes. we have to test all possible scenarios.
Its a scenario in support where we needed quick fix for an issue, we went on to make sure it runs fine till April of this year as an adhoc request. If its via a Design/developement request rather than adhoc, then we definitely have time and had explored every test scenarios(century leap year,regular leap year) in place and go in processed way SDLC. Client is more of correct fix at that time when it comes to an adhoc. Wish my client didnt read this post
Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
Posted: Thu Feb 24, 2011 12:12 pm Post subject:
radkrish82 wrote:
well, I agree. yes. we have to test all possible scenarios.
Its a scenario in support where we needed quick fix for an issue, we went on to make sure it runs fine till April of this year as an adhoc request. If its via a Design/developement request rather than adhoc, then we definitely have time and had explored every test scenarios(century leap year,regular leap year) in place and go in processed way SDLC. Client is more of correct fix at that time when it comes to an adhoc. Wish my client didnt read this post
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum