Vuo 2.4.4
Loading...
Searching...
No Matches
VuoTime.h
Go to the documentation of this file.
1
10#pragma once
11
12#ifdef __cplusplus
13extern "C" {
14#endif
15
16#include "VuoInteger.h"
17#include "VuoReal.h"
18#include "VuoWeekday.h"
19#include "VuoText.h"
20#include "VuoTimeFormat.h"
21#include "VuoTimeUnit.h"
22
23#include <xlocale.h>
24
46typedef double VuoTime;
47
48#define VuoTime_SUPPORTS_COMPARISON
49#include "VuoList_VuoTime.h"
50
51VuoTime VuoTime_makeFromJson(struct json_object *js);
52struct json_object *VuoTime_getJson(const VuoTime value);
53char *VuoTime_getSummary(const VuoTime value);
54
55bool VuoTime_areEqual(const VuoTime valueA, const VuoTime valueB);
56bool VuoTime_isLessThan(const VuoTime valueA, const VuoTime valueB);
57
58bool VuoTime_areEqualWithinTolerance(VuoList_VuoTime times, VuoReal tolerance, VuoTimeUnit toleranceUnit);
60bool VuoTime_isTimeOfDayLessThan(const VuoTime valueA, const VuoTime valueB, const VuoTime startOfDay);
61
63VuoTime VuoTime_make(VuoInteger year, VuoInteger month, VuoInteger dayOfMonth, VuoInteger hour, VuoInteger minute, VuoReal second);
64VuoTime VuoTime_makeFromRFC822(const char *rfc822);
65VuoTime VuoTime_makeFromISO8601(const char *iso8601);
67bool VuoTime_getComponents(VuoTime time, VuoInteger *year, VuoInteger *dayOfYear, VuoInteger *month, VuoInteger *dayOfMonth, VuoInteger *week, VuoWeekday *dayOfWeek, VuoInteger *hour, VuoInteger *minute, VuoReal *second) VuoWarnUnusedResult;
68VuoTime VuoTime_round(const VuoTime value, const VuoTimeUnit unit, const int roundingMethod);
69VuoText VuoTime_format(const VuoTime time, const VuoTimeFormat format);
70VuoText VuoTime_formatWithLocale(const VuoTime time, const VuoTimeFormat format, locale_t locale);
71
76char *VuoTime_getString(const VuoTime value);
80
85#ifdef __cplusplus
86}
87#endif