31 #ifndef vtkTimePointUtility_h
32 #define vtkTimePointUtility_h
34 #include "vtkCommonCoreModule.h"
48 int year,
int month,
int day);
55 int hour,
int minute,
int second,
int millis = 0);
61 int year,
int month,
int day,
62 int hour,
int minute,
int sec,
int millis = 0);
69 int& year,
int& month,
int& day);
76 int& hour,
int& minute,
int& second,
int& millis);
83 int& year,
int& month,
int& day,
84 int& hour,
int& minute,
int& second,
int& millis);
122 ISO8601_DATETIME_MILLIS = 0,
123 ISO8601_DATETIME = 1,
125 ISO8601_TIME_MILLIS = 3,
168 vtkTypeUInt64,
int format = ISO8601_DATETIME_MILLIS);
a simple class to control print indentation
abstract base class for most VTK objects
performs common time operations
static int GetMillisecond(vtkTypeUInt64 time)
Retrieve the milliseconds from the start of the last second.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
static vtkTypeUInt64 DateToTimePoint(int year, int month, int day)
Return the time point for 12:00am on a specified day.
static const int SECONDS_PER_DAY
static int GetDay(vtkTypeUInt64 time)
Retrieve the day of the month from a time point.
~vtkTimePointUtility() override
static const int MILLIS_PER_HOUR
static vtkTypeUInt64 TimeToTimePoint(int hour, int minute, int second, int millis=0)
Return the time point for a time of day (the number of milliseconds from 12:00am.
static const int HOURS_PER_DAY
static int GetYear(vtkTypeUInt64 time)
Retrieve the year from a time point.
static void GetDate(vtkTypeUInt64 time, int &year, int &month, int &day)
Retrieve the year, month, and day of a time point.
static const int MILLIS_PER_MINUTE
static int GetHour(vtkTypeUInt64 time)
Retrieve the hour of the day from the time point.
static vtkTypeUInt64 ISO8601ToTimePoint(const char *str, bool *ok=NULL)
Converts a ISO8601 string into a VTK timepoint.
static const char * TimePointToISO8601(vtkTypeUInt64, int format=ISO8601_DATETIME_MILLIS)
Converts a VTK timepoint into one of the following ISO8601 formats.
static void GetTime(vtkTypeUInt64 time, int &hour, int &minute, int &second, int &millis)
Retrieve the hour, minute, second, and milliseconds of a time point.
static void GetDateTime(vtkTypeUInt64 time, int &year, int &month, int &day, int &hour, int &minute, int &second, int &millis)
Retrieve the date and time of a time point.
static int GetMinute(vtkTypeUInt64 time)
Retrieve the number of minutes from the start of the last hour.
static int GetMonth(vtkTypeUInt64 time)
Retrieve the month from a time point.
static vtkTimePointUtility * New()
static const int MILLIS_PER_DAY
static const int SECONDS_PER_MINUTE
static const int MINUTES_PER_DAY
static const int MILLIS_PER_SECOND
static const int SECONDS_PER_HOUR
static vtkTypeUInt64 DateTimeToTimePoint(int year, int month, int day, int hour, int minute, int sec, int millis=0)
Return the time point for a date and time.
static int GetSecond(vtkTypeUInt64 time)
Retrieve the number of seconds from the start of the last minute.
static const int MINUTES_PER_HOUR