mirror of
https://github.com/HowardHinnant/date.git
synced 2025-08-05 05:34:27 +02:00
Updated Examples and Recipes (markdown)
@@ -1591,7 +1591,7 @@ Once we have a string of form 2), give this sample code a try (thank you [Aaron]
|
|||||||
#include <string>
|
#include <string>
|
||||||
#include "tz.h"
|
#include "tz.h"
|
||||||
|
|
||||||
void main()
|
int main()
|
||||||
{
|
{
|
||||||
using namespace std;
|
using namespace std;
|
||||||
using namespace date;
|
using namespace date;
|
||||||
@@ -1601,7 +1601,7 @@ Once we have a string of form 2), give this sample code a try (thank you [Aaron]
|
|||||||
// Using local_seconds would resolve in ambiguous date exception
|
// Using local_seconds would resolve in ambiguous date exception
|
||||||
sys_seconds tp;
|
sys_seconds tp;
|
||||||
string tz_name;
|
string tz_name;
|
||||||
parse(inputStream, "%F %T %Ez %Z", tp, tz_name);
|
inputStream >> parse("%F %T %Ez %Z", tp, tz_name);
|
||||||
|
|
||||||
// bool operator tells us whether stream was successfully parsed
|
// bool operator tells us whether stream was successfully parsed
|
||||||
assert(bool(inputStream));
|
assert(bool(inputStream));
|
||||||
|
Reference in New Issue
Block a user