datetime/time quickie

vurentjie vurentjie at gmail.com
Sun Jul 22 13:55:49 PDT 2012


On Sunday, 22 July 2012 at 20:50:15 UTC, vurentjie wrote:
> hi,
>
> i can't seem to find how to do this in the docs ... simple 
> example
>
> i have 2 times 9:00,12:00 for which i need to get the interval 
> between them in minutes, ie 180
>
> i though I could use Interval!TimeOfDay("9:00:00","12:00:00") 
> and convert this to minutes from here but this does not seem to 
> be correct.
>
> i have looked at Duration!(Tp)().total!"minutes"();
>
> but i cant seem to figure out how to use Interval/Duration 
> together (without rolling out some kind of hacked intermediate 
> method)
>
> any quick advice

sorry quick edit to avoid confusion - i know this should be

Interval!TimeOfDay(TimeOfDay1,TimeOfDay2)

and not the literal strings


More information about the Digitalmars-d-learn mailing list