dateparser
dateparser is a natural language date/time parser for OutSystems applications. See below for the wide variety of formats dateparser will parse.
Last updated
dateparser is a natural language date/time parser for OutSystems applications. See below for the wide variety of formats dateparser will parse.
Last updated
You can install dateparser from the OutSystems Forge component page:
Parse
Attempts to parse a string into a DateTime (exceptions are raised).
String (Text, Mandatory)
Type (Integer)
Past = -1, Future = 1, None = 0
DateTime (DateTime)
TryParse
String (Text, Mandatory)
e.g.: may 27th
Type (Integer)
Past = -1, Future = 1, None = 0
DateTime (DateTime)
dateparser can parse a huge variety of date and time formats. Following is a small sample of strings that will be properly parsed. Parsing is case-insensitive and will handle common abbreviations and misspellings.
For the cases where temporal time is not specific, it's possible to set Type parameter to indicate if the parsing should take into consideration past or future dates.
Example:
Simple
Complex
Specific Dates
february 14, 2004
etc.
last friday at 20:00 ()
last week tuesday ()
tomorrow at 6:45pm ()
thursday last week ()
3 years ago ()
5 months before now ()
7 hours ago ()
7 days from now ()
1 week hence ()
3 months ago saturday at 5:00 pm ()
3rd month next year ()
3rd thursday this september ()
4th day last week ()
fourteenth of june 2010 at eleven o'clock in the evening ()
may seventh '97 at three in the morning ()
January 5 ()
22nd of june ()
5th may 2017 ()
February twenty first ()
dec 25 ()
february 14th, 2004 ()
17 april 85 ()
27/5/1979 ()
You can see the component demo .