Open jshanab opened 5 years ago
#include "date/date.h"
#include <iostream>
int
main()
{
using namespace std;
using namespace std::chrono;
using namespace date;
cout << format("%FT%TZ\n", floor<seconds>(system_clock::now()));
}
Example output:
2019-06-14T00:41:48Z
This would be a useful addition to the readme.
Having a header only include for date ontop of c++11... sounds like just what I need. but...
By far the most common format associated with ISO 8601 are strings in the form YYYY-MM-DDThh:mm:ssZ
Often used in json and xml serialized/de-serialized communications
In your examples you tend to have spaces and microseconds.
2016-05-14 18:33:24.205124 EDT
What do you suggest as the best way to use your library for these cases?