![]() |
Telelogic DOORS (steve huntington) | ![]() |
new topic :
profile :
search :
help :
dashboard :
calendar :
home
|
||
Latest News:
|
|
Topic Title: How to check if a date is valid Topic Summary: Created On: 4-Apr-2006 16:30 Status: Post and Reply |
Linear : Threading : Single : Branch |
![]() |
![]()
|
![]() |
|
How can you check to see if a user's input of a date is valid? Is there a dxl function to verify validity of dates? |
|
![]() |
|
![]() |
|
Try this.
------------------------- Shawn Stepper shawn.e.stepper@wellsfargo.com |
|
![]() |
|
![]() |
|
Thanks for the code, I've tried your way, but the user wants a flexable GUI that will take all of the DOORS valid dates, so I tried using the following: bool DateIsValid(string s) { Date d bool b_result noError d = s err = lastError if (!null err && !null s) then return false else return true } |
|
![]() |
|
![]() |
|
I have reported this as a bug to DOORS support.
There is a bug in the way date strings are validated. I can assign a date as follows: Date d = "3/32/2006" which gets converted to "1 April 2006". or Date d = "3/11648/2006" which gets converted to "19 January 2038". This date is the maximum that it will accept. This error only seems to occur when entering dates in US format as above. Using european format (DD/MM/YYYY) is okay. The same behaviour is exhibited when entering date strings into an attribute using the GUI. I am using DOORS 7.1 patch 011 on Windows 2000 professional. ------------------------- Tony Goodman http://www.smartdxl.com |
|
![]() |
|
![]() |
|
I just checked and this bug seems to be fixed in DOORS 8.0.
I am in the UK. Maybe someone in the states can confirm that this is fixed there too. ------------------------- Tony Goodman http://www.smartdxl.com |
|
![]() |
|
![]() |
|
Using US format dates is pretty rediculous since while DOORS can tell that "3/21/06" means "March 21 2006" it thinks that "3/7/06" is in European format, "3 July 2006" instead of the intended "March 7 2006". Since its limited, DOORS should not recognize these dates at all.
All my DXL outputs thusly: "2006-Mar-07" primarily when used in file names it sorts pretty well. I cannot bring myself to this format: "2006-03-07" since I personally cannot count months to 12, unless I've got a shoe off. - Louie I was also arrested once counting to 21 in a black-jack game. lol |
|
![]() |
Telelogic DOORS
» DXL Exchange
»
How to check if a date is valid
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.