NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.
All the Perl that's Practical to Extract and Report
Stories, comments, journals, and other submissions on use Perl; are Copyright 1998-2006, their respective owners.
PowerShell date fanboy + where's your Amazon ... (Score:1)
PS C:\> [datetime] | gm -Static
TypeName: System.DateTime
Name MemberType Definition
---- ---------- ----------
Compare Method static System.Int32 Compare(DateTime t1, DateTime t2)
DaysInMonth Method static System.Int32 DaysInMonth(Int32 year, Int32 month)
Equals Method static System.Boolean Equals(DateTime t1, DateTime t2), static System.Boolean Equals(Obje...
FromBinary Method static System.DateTime FromBinary(Int64 dateData)
FromFileTime Method static System.DateTime FromFileTime(Int64 fileTime)
FromFileTimeUtc Method static System.DateTime FromFileTimeUtc(Int64 fileTime)
FromOADate Method static System.DateTime FromOADate(Double d)
IsLeapYear Method static System.Boolean IsLeapYear(Int32 year)
Parse Method static System.DateTime Parse(String s), static System.DateTime Parse(String s, IFormatPro...
ParseExact Method static System.DateTime ParseExact(String s, String format, IFormatProvider provider), sta...
ReferenceEquals Method static System.Boolean ReferenceEquals(Object objA, Object objB)
SpecifyKind Method static System.DateTime SpecifyKind(DateTime value, DateTimeKind kind)
TryParse Method static System.Boolean TryParse(String s, DateTime& result), static System.Boolean TryPars...
TryParseExact Method static System.Boolean TryParseExact(String s, String format, IFormatProvider provider, Da...
MaxValue Property static System.DateTime MaxValue {get;}
MinValue Property static System.DateTime MinValue {get;}
Now Property System.DateTime Now {get;}
Today Property System.DateTime Today {get;}
UtcNow Property System.DateTime UtcNow {get;}
PS C:\> [datetime]::Today
Sunday, 11 April 2010 12:00:00 AM
PS C:\> ([datetime]::Now - [datetime] '03/20/2010').Days
22
PS C:\>
I really enjoy reading stuff about P6. Who knows, maybe I can even write bad-babytalk P6 one millenium.
Please create & publish an Amazon wish list so those wannabe P6 Medicis out there can thank you.
Thank you !
Reply to This
Re: (Score:1)
I think we're already on the road to meeting your requests.
DateTime.today()(DateTime.now - DateTime.new('2010-03-20T00:00:00')).days(With moritz++'s proposed
Dateclass, the second example might be even more straightforward. It feels a bit silly to specify00:00:00just to be able to use the ISO8601 constructor.)Please create & publish an Amazon wish list so those wannabe P6 Medicis out there can thank you.
As it happens, I have one already [amazon.com], but more for keeping track of things myself than for people to thank me.
Re: (Score:1)
Please create & publish an Amazon wish list so those wannabe P6 Medicis out there can thank you.
The book [amazon.com] you bought for me arrived today. I just want you to know that not only was the book a pleasant surprise, but the act itself made me giddy with gratitude. Thank you so much! Hoping to find occasion to pay it forward [wikipedia.org] real soon.
Re: (Score:1)
I think you mean, paraphrasing ala P6,
Ya got to do unto others Like you'd have them, like you'd have them, do unto you.
(quite a nice chorus to an old Dylan tune [the music not the language] http://www.mp3lyrics.org/b/bob-dylan/do-right-to-me-baby-do-unto-others/ [mp3lyrics.org] )