datefmt 1.0.2

Datetime parsing and formatting


To use this package, put the following dependency into your project's dependencies section:

dub.json
dub.sdl

datefmt

Date formatting and parsing based on strftime.

Usage

Example:

import datefmt;
auto st = SysTime(DateTime(2014, 4, 17, 14, 47, 35), UTC());
writefln(st.format("%a, %d %b %Y %H:%M:%S GMT"));
// Thu, 17 Apr 2014 14:47:35 GMT

Most of the formatting options can also be used to parse:

import datefmt;
auto st = "Thu, 17 Apr 2014 14:47:35 GMT".parse("%a, %d %b %Y %H:%M:%S GMT");
assert(st == SysTime(DateTime(2014, 4, 17, 14, 47, 35), UTC()));

Yes, there's another date parsing library out there, but that is to take garbage dates and try to produce something sensible out of it. This is for stricter parsing.

Dub

Add a dependency on "datefmt": "~>1.0.0".

Authors:
dhasenan
Dependencies:
none
Versions:
1.0.2 2017-Dec-20
1.0.1 2017-Dec-14
1.0.0 2017-Dec-12
0.4.0 2017-Sep-01
0.3.0 2017-Jul-04
Show all 8 versions
Download Stats:
  • 0 downloads today

  • 4 downloads this week

  • 8 downloads this month

  • 132 downloads total