Search

Assorted Linkage

Current Terror Alert Level

ClustrMap

« Everything old is new again | Main| PercentRem.com »

Cheap date

Category domino lotusscript
I just had an epiphany... or maybe just an apostrophe. I'm in the middle of some code that does some date matching (determines which document to process based on date information posted from a web application). I don't have control over the date format posted to the agent, and currently the format is [Month abbreviation][unpadded day number][day number suffix] - i.e., Apr15th. I already knew that passing "April 15th" to the constructor of a NotesDateTime object would create an instance representing [04/15/2008 12:00:00]. But did you know that "Apr15th" will too? As it turns out, it actually ignores the suffix: "Apr15bogus", for example, creates a date with the same properties. Always good to find these things out before I resort to string parsing...

(cross-posted at BleedYellow)

Comments

Gravatar Image1 - An recent conversation on date parsing:

{ Link }

Post A Comment

:-D:-o:-p:-x:-(:-):-\:angry::cool::cry::emb::grin::huh::laugh::lips::rolleyes:;-)

Contact Me

Hire Me

Elsewhere

What the Quote?

"Blow the road's nose."

Laura Tripcony

"So it's a little like 'E.T.', if E.T. was eating people."

Chris Toohey

"It won't scan the monkey!"

Tim Tripcony

"That's a crazy, wet amount of water. I'm gonna eat a bear."

Laura Tripcony

"Dragonflies do it in the air."

Laura Tripcony

Apparel

Lotus Rocks

I write the code that makes the young girls cry