Vuo  2.3.2
VuoTime.h
Go to the documentation of this file.
1 
10 #pragma once
11 
12 #include "VuoInteger.h"
13 #include "VuoReal.h"
14 #include "VuoWeekday.h"
15 #include "VuoText.h"
16 #include "VuoTimeFormat.h"
17 #include "VuoTimeUnit.h"
18 
20 typedef void * VuoList_VuoTime;
21 #define VuoList_VuoTime_TYPE_DEFINED
23 
45 typedef double VuoTime;
46 
48 struct json_object *VuoTime_getJson(const VuoTime value);
49 char *VuoTime_getSummary(const VuoTime value);
50 
51 #define VuoTime_SUPPORTS_COMPARISON
52 bool VuoTime_areEqual(const VuoTime valueA, const VuoTime valueB);
53 bool VuoTime_isLessThan(const VuoTime valueA, const VuoTime valueB);
54 
55 bool VuoTime_areEqualWithinTolerance(VuoList_VuoTime times, VuoReal tolerance, VuoTimeUnit toleranceUnit);
57 bool VuoTime_isTimeOfDayLessThan(const VuoTime valueA, const VuoTime valueB, const VuoTime startOfDay);
58 
60 VuoTime VuoTime_make(VuoInteger year, VuoInteger month, VuoInteger dayOfMonth, VuoInteger hour, VuoInteger minute, VuoReal second);
61 VuoTime VuoTime_makeFromRFC822(const char *rfc822);
62 VuoTime VuoTime_makeFromISO8601(const char *iso8601);
63 VuoTime VuoTime_makeFromUnknownFormat(const char *str);
64 bool VuoTime_getComponents(VuoTime time, VuoInteger *year, VuoInteger *dayOfYear, VuoInteger *month, VuoInteger *dayOfMonth, VuoInteger *week, VuoWeekday *dayOfWeek, VuoInteger *hour, VuoInteger *minute, VuoReal *second) VuoWarnUnusedResult;
65 VuoTime VuoTime_round(const VuoTime value, const VuoTimeUnit unit, const int roundingMethod);
66 VuoText VuoTime_format(const VuoTime time, const VuoTimeFormat format);
67 VuoText VuoTime_formatWithLocale(const VuoTime time, const VuoTimeFormat format, const VuoText localeIdentifier);
68 
74 char *VuoTime_getString(const VuoTime value);
75 void VuoTime_retain(VuoTime value);
78