2483 lines
91 KiB
C
2483 lines
91 KiB
C
/* Generated by Nim Compiler v1.9.0 */
|
|
#define NIM_INTBITS 64
|
|
|
|
#include "nimbase.h"
|
|
#include <time.h>
|
|
#include <string.h>
|
|
#undef LANGUAGE_C
|
|
#undef MIPSEB
|
|
#undef MIPSEL
|
|
#undef PPC
|
|
#undef R3000
|
|
#undef R4000
|
|
#undef i386
|
|
#undef linux
|
|
#undef mips
|
|
#undef near
|
|
#undef far
|
|
#undef powerpc
|
|
#undef unix
|
|
#define nimfr_(x, y)
|
|
#define nimln_(x, y)
|
|
typedef struct tyObject_TimezonecolonObjectType___F8OvqlxXyGXRSiK9c1fCDVw tyObject_TimezonecolonObjectType___F8OvqlxXyGXRSiK9c1fCDVw;
|
|
typedef struct tyObject_Time__3y2ZpqsTJLqdZvpC9a0rU2Q tyObject_Time__3y2ZpqsTJLqdZvpC9a0rU2Q;
|
|
typedef struct TNimTypeV2 TNimTypeV2;
|
|
typedef struct tyObject_DateTime__d9cK9cyKZPJJxFXUmx8dSpPw tyObject_DateTime__d9cK9cyKZPJJxFXUmx8dSpPw;
|
|
typedef struct tyObject_RefHeader__Gi7WQzlT1ZRToh9a2ueYb4A tyObject_RefHeader__Gi7WQzlT1ZRToh9a2ueYb4A;
|
|
typedef struct RootObj RootObj;
|
|
typedef struct tyObject_ZonedTime__WigfH9apQAxJ69bBPh3wB8RQ tyObject_ZonedTime__WigfH9apQAxJ69bBPh3wB8RQ;
|
|
typedef struct NimStrPayload NimStrPayload;
|
|
typedef struct NimStringV2 NimStringV2;
|
|
typedef struct tyObject_GcEnv__g0b9ao2MXcYnUpu9b4I8eP9bQ tyObject_GcEnv__g0b9ao2MXcYnUpu9b4I8eP9bQ;
|
|
typedef struct tyObject_CellSeq__sGle0igznE2T7vk4dBh5SQ tyObject_CellSeq__sGle0igznE2T7vk4dBh5SQ;
|
|
typedef struct tyTuple__N4J9cV4JZGem3ljqqj5rT0Q tyTuple__N4J9cV4JZGem3ljqqj5rT0Q;
|
|
typedef struct tyObject_CellSeq__z4KasHYddby49cXX2MD4LxQ tyObject_CellSeq__z4KasHYddby49cXX2MD4LxQ;
|
|
typedef struct tyTuple__0F3Kz25HWtRatQmCDVHWEA tyTuple__0F3Kz25HWtRatQmCDVHWEA;
|
|
typedef struct tyObject_TimeFormat__Nsh4TB3AD6ERMz3D74BTxA tyObject_TimeFormat__Nsh4TB3AD6ERMz3D74BTxA;
|
|
typedef struct tyObject_DateTimeLocale__uNv3Dc4hHpAREXnLVqGWZQ tyObject_DateTimeLocale__uNv3Dc4hHpAREXnLVqGWZQ;
|
|
typedef struct tySequence__6H5Oh5UUvVCLiakt9aTwtUQ tySequence__6H5Oh5UUvVCLiakt9aTwtUQ;
|
|
typedef struct tySequence__6H5Oh5UUvVCLiakt9aTwtUQ_Content tySequence__6H5Oh5UUvVCLiakt9aTwtUQ_Content;
|
|
typedef struct tyObject_Duration__lj9ar6Co3fgk6NgGnVaNpJw tyObject_Duration__lj9ar6Co3fgk6NgGnVaNpJw;
|
|
typedef struct tyTuple__XjuGlLf9cyYx66ViXrBCvPQ tyTuple__XjuGlLf9cyYx66ViXrBCvPQ;
|
|
typedef struct tyTuple__47w2DboNEPf69aPgubZdd7Q tyTuple__47w2DboNEPf69aPgubZdd7Q;
|
|
typedef struct tyTuple__pfrdooyxJsC6cg34ebuBag tyTuple__pfrdooyxJsC6cg34ebuBag;
|
|
struct tyObject_Time__3y2ZpqsTJLqdZvpC9a0rU2Q {
|
|
NI64 seconds;
|
|
NI nanosecond;
|
|
};
|
|
struct TNimTypeV2 {
|
|
void* destructor;
|
|
NI size;
|
|
NI16 align;
|
|
NI16 depth;
|
|
NU32* display;
|
|
void* traceImpl;
|
|
void* typeInfoV1;
|
|
NI flags;
|
|
};
|
|
struct tyObject_RefHeader__Gi7WQzlT1ZRToh9a2ueYb4A {
|
|
NI rc;
|
|
NI rootIdx;
|
|
};
|
|
struct RootObj {
|
|
TNimTypeV2* m_type;
|
|
};
|
|
typedef NU8 tyEnum_WeekDay__SVfemTA9aCOyua2TJYa6yBg;
|
|
struct tyObject_DateTime__d9cK9cyKZPJJxFXUmx8dSpPw {
|
|
RootObj Sup;
|
|
NI nanosecond;
|
|
NI second;
|
|
NI minute;
|
|
NI hour;
|
|
NI monthdayZero;
|
|
NI monthZero;
|
|
NI year;
|
|
tyEnum_WeekDay__SVfemTA9aCOyua2TJYa6yBg weekday;
|
|
NI yearday;
|
|
NIM_BOOL isDst;
|
|
tyObject_TimezonecolonObjectType___F8OvqlxXyGXRSiK9c1fCDVw* timezone;
|
|
NI utcOffset;
|
|
};
|
|
typedef struct {
|
|
N_NIMCALL_PTR(void, ClP_0) (tyObject_Time__3y2ZpqsTJLqdZvpC9a0rU2Q x, tyObject_ZonedTime__WigfH9apQAxJ69bBPh3wB8RQ* Result, void* ClE_0);
|
|
void* ClE_0;
|
|
} tyProc__7xnKxEC24cr3qZyj3gX32w;
|
|
struct NimStrPayload {
|
|
NI cap;
|
|
NIM_CHAR data[SEQ_DECL_SIZE];
|
|
};
|
|
struct NimStringV2 {
|
|
NI len;
|
|
NimStrPayload* p;
|
|
};
|
|
struct tyObject_TimezonecolonObjectType___F8OvqlxXyGXRSiK9c1fCDVw {
|
|
tyProc__7xnKxEC24cr3qZyj3gX32w zonedTimeFromTimeImpl;
|
|
tyProc__7xnKxEC24cr3qZyj3gX32w zonedTimeFromAdjTimeImpl;
|
|
NimStringV2 name;
|
|
};
|
|
struct tyObject_CellSeq__sGle0igznE2T7vk4dBh5SQ {
|
|
NI len;
|
|
NI cap;
|
|
tyTuple__N4J9cV4JZGem3ljqqj5rT0Q* d;
|
|
};
|
|
struct tyObject_CellSeq__z4KasHYddby49cXX2MD4LxQ {
|
|
NI len;
|
|
NI cap;
|
|
tyTuple__0F3Kz25HWtRatQmCDVHWEA* d;
|
|
};
|
|
struct tyObject_GcEnv__g0b9ao2MXcYnUpu9b4I8eP9bQ {
|
|
tyObject_CellSeq__sGle0igznE2T7vk4dBh5SQ traceStack;
|
|
tyObject_CellSeq__z4KasHYddby49cXX2MD4LxQ toFree;
|
|
NI freed;
|
|
NI touched;
|
|
NI edges;
|
|
NI rcSum;
|
|
NIM_BOOL keepThreshold;
|
|
};
|
|
struct tyTuple__N4J9cV4JZGem3ljqqj5rT0Q {
|
|
void** Field0;
|
|
TNimTypeV2* Field1;
|
|
};
|
|
typedef tyTuple__N4J9cV4JZGem3ljqqj5rT0Q tyUncheckedArray__72XmdLy0QAaMtx66AmNKfA[1];
|
|
struct tySequence__6H5Oh5UUvVCLiakt9aTwtUQ {
|
|
NI len; tySequence__6H5Oh5UUvVCLiakt9aTwtUQ_Content* p;
|
|
};
|
|
struct tyObject_TimeFormat__Nsh4TB3AD6ERMz3D74BTxA {
|
|
tySequence__6H5Oh5UUvVCLiakt9aTwtUQ patterns;
|
|
NimStringV2 formatStr;
|
|
};
|
|
typedef NU8 tyEnum_FormatPattern__asapJ9b4qGHESR0g3CfbCjQ;
|
|
typedef NimStringV2 tyArray__3hurAvNmIXWWeqMzKryr2A[12];
|
|
typedef NimStringV2 tyArray__O9c55L7dGQruaGz5nJ2r4rA[7];
|
|
struct tyObject_DateTimeLocale__uNv3Dc4hHpAREXnLVqGWZQ {
|
|
tyArray__3hurAvNmIXWWeqMzKryr2A MMM;
|
|
tyArray__3hurAvNmIXWWeqMzKryr2A MMMM;
|
|
tyArray__O9c55L7dGQruaGz5nJ2r4rA ddd;
|
|
tyArray__O9c55L7dGQruaGz5nJ2r4rA dddd;
|
|
};
|
|
typedef NU8 tyEnum_Month__JS0JuFvCBbC2GL3xXBnPQw;
|
|
typedef NU8 tyEnum_TimeUnit__52alPn04ElUUbqLeok9b3PQ;
|
|
typedef NI64 tyArray__pDfjTbtkTNjmi9bTcaNV32Q[8];
|
|
struct tyObject_Duration__lj9ar6Co3fgk6NgGnVaNpJw {
|
|
NI64 seconds;
|
|
NI nanosecond;
|
|
};
|
|
struct tyObject_ZonedTime__WigfH9apQAxJ69bBPh3wB8RQ {
|
|
tyObject_Time__3y2ZpqsTJLqdZvpC9a0rU2Q time;
|
|
NI utcOffset;
|
|
NIM_BOOL isDst;
|
|
};
|
|
struct tyTuple__XjuGlLf9cyYx66ViXrBCvPQ {
|
|
NI Field0;
|
|
tyEnum_Month__JS0JuFvCBbC2GL3xXBnPQw Field1;
|
|
NI Field2;
|
|
};
|
|
struct tyTuple__47w2DboNEPf69aPgubZdd7Q {
|
|
NI Field0;
|
|
NI Field1;
|
|
NI Field2;
|
|
};
|
|
typedef NI tyArray__Splpnswz3rudLg9bDsQoDXg[12];
|
|
typedef N_CLOSURE_PTR(void, TM__6NbDwwj5FY059b1gz2AsAZQ_67) (tyObject_Time__3y2ZpqsTJLqdZvpC9a0rU2Q x, tyObject_ZonedTime__WigfH9apQAxJ69bBPh3wB8RQ* Result);
|
|
typedef N_CLOSURE_PTR(void, TM__6NbDwwj5FY059b1gz2AsAZQ_69) (tyObject_Time__3y2ZpqsTJLqdZvpC9a0rU2Q time, tyObject_ZonedTime__WigfH9apQAxJ69bBPh3wB8RQ* Result, void* ClE_0);
|
|
typedef N_CLOSURE_PTR(void, TM__6NbDwwj5FY059b1gz2AsAZQ_70) (tyObject_Time__3y2ZpqsTJLqdZvpC9a0rU2Q adjTime, tyObject_ZonedTime__WigfH9apQAxJ69bBPh3wB8RQ* Result, void* ClE_0);
|
|
struct tyTuple__pfrdooyxJsC6cg34ebuBag {
|
|
NI Field0;
|
|
NIM_BOOL Field1;
|
|
};
|
|
typedef N_CLOSURE_PTR(void, TM__6NbDwwj5FY059b1gz2AsAZQ_75) (tyObject_Time__3y2ZpqsTJLqdZvpC9a0rU2Q time, tyObject_ZonedTime__WigfH9apQAxJ69bBPh3wB8RQ* Result, void* ClE_0);
|
|
typedef N_CLOSURE_PTR(void, TM__6NbDwwj5FY059b1gz2AsAZQ_76) (tyObject_Time__3y2ZpqsTJLqdZvpC9a0rU2Q adjTime, tyObject_ZonedTime__WigfH9apQAxJ69bBPh3wB8RQ* Result, void* ClE_0);
|
|
|
|
|
|
#ifndef tySequence__6H5Oh5UUvVCLiakt9aTwtUQ_Content_PP
|
|
#define tySequence__6H5Oh5UUvVCLiakt9aTwtUQ_Content_PP
|
|
struct tySequence__6H5Oh5UUvVCLiakt9aTwtUQ_Content { NI cap; NU8 data[SEQ_DECL_SIZE];};
|
|
#endif
|
|
|
|
static N_INLINE(void, nimZeroMem)(void* p, NI size);
|
|
static N_INLINE(void, nimSetMem__systemZmemory_7)(void* a, int v, NI size);
|
|
static N_INLINE(NIM_BOOL*, nimErrorFlag)(void);
|
|
static N_INLINE(NF, toFloat__system_1672)(NI i);
|
|
N_LIB_PRIVATE N_NIMCALL(tyObject_Time__3y2ZpqsTJLqdZvpC9a0rU2Q, initTime__pureZtimes_1013)(NI64 unix_0, NI nanosecond);
|
|
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___pureZtimes_1412)(tyObject_DateTime__d9cK9cyKZPJJxFXUmx8dSpPw* dest);
|
|
static N_INLINE(NIM_BOOL, nimDecRefIsLastCyclicStatic)(void* p, TNimTypeV2* desc);
|
|
static N_INLINE(NI, minuspercent___system_790)(NI x, NI y);
|
|
N_LIB_PRIVATE N_NOINLINE(void, rememberCycle__system_3143)(NIM_BOOL isDestroyAction, tyObject_RefHeader__Gi7WQzlT1ZRToh9a2ueYb4A* s, TNimTypeV2* desc);
|
|
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___pureZtimes_1300)(tyObject_TimezonecolonObjectType___F8OvqlxXyGXRSiK9c1fCDVw* dest);
|
|
static N_INLINE(NIM_BOOL, nimDecRefIsLastCyclicDyn)(void* p);
|
|
N_LIB_PRIVATE N_NIMCALL(void, nimDestroyAndDispose)(void* p);
|
|
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___stdZassertions_13)(NimStringV2* dest);
|
|
N_LIB_PRIVATE N_NIMCALL(void, eqtrace___pureZtimes_1309)(tyObject_TimezonecolonObjectType___F8OvqlxXyGXRSiK9c1fCDVw* dest, void* env);
|
|
static N_INLINE(void, nimTraceRefDyn)(void* q, void* env);
|
|
static N_INLINE(void, add__system_2688)(tyObject_CellSeq__sGle0igznE2T7vk4dBh5SQ* s, void** c, TNimTypeV2* t);
|
|
N_LIB_PRIVATE N_NOCONV(void*, allocImpl__system_1735)(NI size);
|
|
static N_INLINE(void, copyMem__system_1719)(void* dest, void* source, NI size);
|
|
static N_INLINE(void, nimCopyMem)(void* dest, void* source, NI size);
|
|
N_LIB_PRIVATE N_NOCONV(void, dealloc)(void* p);
|
|
N_LIB_PRIVATE N_NIMCALL(void, nimRawDispose)(void* p, NI alignment);
|
|
N_LIB_PRIVATE N_NIMCALL(void, eqtrace___pureZtimes_1421)(tyObject_DateTime__d9cK9cyKZPJJxFXUmx8dSpPw* dest, void* env);
|
|
static N_INLINE(void, nimTraceRef)(void* q, TNimTypeV2* desc, void* env);
|
|
N_LIB_PRIVATE N_NIMCALL(NimStringV2, format__pureZtimes_3590)(tyObject_DateTime__d9cK9cyKZPJJxFXUmx8dSpPw* dt, tyObject_TimeFormat__Nsh4TB3AD6ERMz3D74BTxA* f, tyObject_DateTimeLocale__uNv3Dc4hHpAREXnLVqGWZQ* loc);
|
|
static N_INLINE(void, nimAddCharV1)(NimStringV2* s, NIM_CHAR c);
|
|
N_LIB_PRIVATE N_NIMCALL(void, prepareAdd)(NimStringV2* s, NI addlen);
|
|
N_LIB_PRIVATE N_NIMCALL(void, formatPattern__pureZtimes_2365)(tyObject_DateTime__d9cK9cyKZPJJxFXUmx8dSpPw* dt, tyEnum_FormatPattern__asapJ9b4qGHESR0g3CfbCjQ pattern, NimStringV2* result, tyObject_DateTimeLocale__uNv3Dc4hHpAREXnLVqGWZQ* loc);
|
|
N_LIB_PRIVATE N_NIMCALL(NimStringV2, dollar___systemZdollars_3)(NI x);
|
|
static N_INLINE(NI, monthday__pureZtimes_1245)(tyObject_DateTime__d9cK9cyKZPJJxFXUmx8dSpPw* dt);
|
|
static N_INLINE(void, appendString)(NimStringV2* dest, NimStringV2 src);
|
|
N_LIB_PRIVATE N_NIMCALL(NimStringV2, nsuIntToStr)(NI x, NI minchars);
|
|
N_LIB_PRIVATE N_NIMCALL(tyEnum_Month__JS0JuFvCBbC2GL3xXBnPQw, month__pureZtimes_1251)(tyObject_DateTime__d9cK9cyKZPJJxFXUmx8dSpPw* dt);
|
|
static N_INLINE(NI, convert__pureZtimes_751)(tyEnum_TimeUnit__52alPn04ElUUbqLeok9b3PQ unitFrom, tyEnum_TimeUnit__52alPn04ElUUbqLeok9b3PQ unitTo, NI quantity);
|
|
static N_INLINE(void, appendChar)(NimStringV2* dest, NIM_CHAR c);
|
|
N_LIB_PRIVATE N_NIMCALL(NimStringV2, rawNewString)(NI space);
|
|
N_LIB_PRIVATE N_NIMCALL(NIM_BOOL, eqeq___pureZtimes_1500)(tyObject_TimezonecolonObjectType___F8OvqlxXyGXRSiK9c1fCDVw* zone1, tyObject_TimezonecolonObjectType___F8OvqlxXyGXRSiK9c1fCDVw* zone2);
|
|
static N_INLINE(NIM_BOOL, eqStrings)(NimStringV2 a, NimStringV2 b);
|
|
static N_INLINE(NIM_BOOL, equalMem__system_1727)(void* a, void* b, NI size);
|
|
static N_INLINE(int, nimCmpMem)(void* a, void* b, NI size);
|
|
N_LIB_PRIVATE N_NIMCALL(void, inZone__pureZtimes_1514)(tyObject_Time__3y2ZpqsTJLqdZvpC9a0rU2Q time, tyObject_TimezonecolonObjectType___F8OvqlxXyGXRSiK9c1fCDVw* zone, tyObject_DateTime__d9cK9cyKZPJJxFXUmx8dSpPw* Result);
|
|
N_LIB_PRIVATE N_NIMCALL(void, initDateTime__pureZtimes_1394)(tyObject_ZonedTime__WigfH9apQAxJ69bBPh3wB8RQ* zt, tyObject_TimezonecolonObjectType___F8OvqlxXyGXRSiK9c1fCDVw* zone, tyObject_DateTime__d9cK9cyKZPJJxFXUmx8dSpPw* Result);
|
|
N_LIB_PRIVATE N_NIMCALL(tyObject_Time__3y2ZpqsTJLqdZvpC9a0rU2Q, ntSubTime)(tyObject_Time__3y2ZpqsTJLqdZvpC9a0rU2Q a, tyObject_Duration__lj9ar6Co3fgk6NgGnVaNpJw b);
|
|
N_LIB_PRIVATE N_NIMCALL(tyObject_Time__3y2ZpqsTJLqdZvpC9a0rU2Q, normalize__pureZtimes_1123)(NI64 seconds, NI64 nanoseconds);
|
|
static N_INLINE(NI64, convert__pureZtimes_486)(tyEnum_TimeUnit__52alPn04ElUUbqLeok9b3PQ unitFrom, tyEnum_TimeUnit__52alPn04ElUUbqLeok9b3PQ unitTo, NI64 quantity);
|
|
static N_INLINE(NI, convert__pureZtimes_553)(tyEnum_TimeUnit__52alPn04ElUUbqLeok9b3PQ unitFrom, tyEnum_TimeUnit__52alPn04ElUUbqLeok9b3PQ unitTo, NI quantity);
|
|
N_LIB_PRIVATE N_NIMCALL(tyObject_Duration__lj9ar6Co3fgk6NgGnVaNpJw, initDuration__pureZtimes_476)(NI64 nanoseconds, NI64 microseconds, NI64 milliseconds, NI64 seconds, NI64 minutes, NI64 hours, NI64 days, NI64 weeks);
|
|
N_LIB_PRIVATE N_NIMCALL(tyObject_Duration__lj9ar6Co3fgk6NgGnVaNpJw, normalize__pureZtimes_543)(NI64 seconds, NI64 nanoseconds);
|
|
N_LIB_PRIVATE N_NIMCALL(NI64, floorDiv__pureZtimes_284)(NI64 x, NI64 y);
|
|
N_LIB_PRIVATE N_NIMCALL(tyTuple__XjuGlLf9cyYx66ViXrBCvPQ, fromEpochDay__pureZtimes_200)(NI64 epochday);
|
|
N_LIB_PRIVATE N_NIMCALL(tyEnum_WeekDay__SVfemTA9aCOyua2TJYa6yBg, getDayOfWeek__pureZtimes_278)(NI monthday, tyEnum_Month__JS0JuFvCBbC2GL3xXBnPQw month, NI year);
|
|
static N_INLINE(void, assertValidDate__pureZtimes_145)(NI monthday, tyEnum_Month__JS0JuFvCBbC2GL3xXBnPQw month, NI year);
|
|
N_LIB_PRIVATE N_NIMCALL(NI64, toEpochDay__pureZtimes_156)(NI monthday, tyEnum_Month__JS0JuFvCBbC2GL3xXBnPQw month, NI year);
|
|
N_LIB_PRIVATE N_NIMCALL(NI, getDayOfYear__pureZtimes_247)(NI monthday, tyEnum_Month__JS0JuFvCBbC2GL3xXBnPQw month, NI year);
|
|
N_LIB_PRIVATE N_NIMCALL(NIM_BOOL, isLeapYear__pureZtimes_138)(NI year);
|
|
static N_INLINE(void, nimMarkCyclic)(void* p);
|
|
N_LIB_PRIVATE N_NIMCALL(void, zonedTimeFromTime__pureZtimes_1471)(tyObject_TimezonecolonObjectType___F8OvqlxXyGXRSiK9c1fCDVw* zone, tyObject_Time__3y2ZpqsTJLqdZvpC9a0rU2Q time, tyObject_ZonedTime__WigfH9apQAxJ69bBPh3wB8RQ* Result);
|
|
N_LIB_PRIVATE N_NIMCALL(tyObject_TimezonecolonObjectType___F8OvqlxXyGXRSiK9c1fCDVw*, utc__pureZtimes_1657)(void);
|
|
N_LIB_PRIVATE N_NIMCALL(void, eqsink___pureZtimes_1294)(tyObject_TimezonecolonObjectType___F8OvqlxXyGXRSiK9c1fCDVw** dest, tyObject_TimezonecolonObjectType___F8OvqlxXyGXRSiK9c1fCDVw* src);
|
|
N_LIB_PRIVATE N_NIMCALL(tyObject_TimezonecolonObjectType___F8OvqlxXyGXRSiK9c1fCDVw*, newTimezone__pureZtimes_1439)(NimStringV2 name, tyProc__7xnKxEC24cr3qZyj3gX32w zonedTimeFromTimeImpl, tyProc__7xnKxEC24cr3qZyj3gX32w zonedTimeFromAdjTimeImpl);
|
|
N_LIB_PRIVATE N_NIMCALL(void*, nimNewObjUninit)(NI size, NI alignment);
|
|
N_LIB_PRIVATE N_NIMCALL(void, utcTzInfo__pureZtimes_1652)(tyObject_Time__3y2ZpqsTJLqdZvpC9a0rU2Q time, tyObject_ZonedTime__WigfH9apQAxJ69bBPh3wB8RQ* Result);
|
|
N_LIB_PRIVATE N_NIMCALL(void, eqcopy___pureZtimes_1290)(tyObject_TimezonecolonObjectType___F8OvqlxXyGXRSiK9c1fCDVw** dest, tyObject_TimezonecolonObjectType___F8OvqlxXyGXRSiK9c1fCDVw* src, NIM_BOOL cyclic);
|
|
static N_INLINE(void, nimIncRefCyclic)(void* p, NIM_BOOL cyclic);
|
|
static N_INLINE(NF, toBiggestFloat__system_1675)(NI64 i);
|
|
N_LIB_PRIVATE N_NIMCALL(void, local__pureZtimes_1688)(tyObject_Time__3y2ZpqsTJLqdZvpC9a0rU2Q t, tyObject_DateTime__d9cK9cyKZPJJxFXUmx8dSpPw* Result);
|
|
N_LIB_PRIVATE N_NIMCALL(tyObject_TimezonecolonObjectType___F8OvqlxXyGXRSiK9c1fCDVw*, local__pureZtimes_1674)(void);
|
|
N_LIB_PRIVATE N_NIMCALL(void, localZonedTimeFromTime__pureZtimes_1625)(tyObject_Time__3y2ZpqsTJLqdZvpC9a0rU2Q time, tyObject_ZonedTime__WigfH9apQAxJ69bBPh3wB8RQ* Result);
|
|
N_LIB_PRIVATE N_NIMCALL(tyTuple__pfrdooyxJsC6cg34ebuBag, getLocalOffsetAndDst__pureZtimes_1564)(NI64 unix_0);
|
|
N_LIB_PRIVATE N_NIMCALL(NI64, clamp__pureZtimes_1577)(NI64 x, NI64 a, NI64 b);
|
|
N_LIB_PRIVATE N_NIMCALL(NI64, toAdjUnix__pureZtimes_1545)(struct tm tm);
|
|
N_LIB_PRIVATE N_NIMCALL(void, localZonedTimeFromAdjTime__pureZtimes_1630)(tyObject_Time__3y2ZpqsTJLqdZvpC9a0rU2Q adjTime, tyObject_ZonedTime__WigfH9apQAxJ69bBPh3wB8RQ* Result);
|
|
N_LIB_PRIVATE N_NIMCALL(tyObject_Time__3y2ZpqsTJLqdZvpC9a0rU2Q, getTime__pureZtimes_1086)(void);
|
|
N_LIB_PRIVATE TNimTypeV2 NTIv2__d9cK9cyKZPJJxFXUmx8dSpPw_;
|
|
N_LIB_PRIVATE TNimTypeV2 NTIv2__F8OvqlxXyGXRSiK9c1fCDVw_;
|
|
static const struct {
|
|
NI cap; NIM_CHAR data[0+1];
|
|
} TM__6NbDwwj5FY059b1gz2AsAZQ_4 = { 0 | NIM_STRLIT_FLAG, "" };
|
|
static const NimStringV2 TM__6NbDwwj5FY059b1gz2AsAZQ_5 = {0, (NimStrPayload*)&TM__6NbDwwj5FY059b1gz2AsAZQ_4};
|
|
static const struct {
|
|
NI cap; NIM_CHAR data[2+1];
|
|
} TM__6NbDwwj5FY059b1gz2AsAZQ_6 = { 2 | NIM_STRLIT_FLAG, "12" };
|
|
static const NimStringV2 TM__6NbDwwj5FY059b1gz2AsAZQ_7 = {2, (NimStrPayload*)&TM__6NbDwwj5FY059b1gz2AsAZQ_6};
|
|
static const NimStringV2 TM__6NbDwwj5FY059b1gz2AsAZQ_8 = {2, (NimStrPayload*)&TM__6NbDwwj5FY059b1gz2AsAZQ_6};
|
|
static const struct {
|
|
NI cap; NIM_CHAR data[1+1];
|
|
} TM__6NbDwwj5FY059b1gz2AsAZQ_9 = { 1 | NIM_STRLIT_FLAG, "P" };
|
|
static const NimStringV2 TM__6NbDwwj5FY059b1gz2AsAZQ_10 = {1, (NimStrPayload*)&TM__6NbDwwj5FY059b1gz2AsAZQ_9};
|
|
static const struct {
|
|
NI cap; NIM_CHAR data[1+1];
|
|
} TM__6NbDwwj5FY059b1gz2AsAZQ_11 = { 1 | NIM_STRLIT_FLAG, "A" };
|
|
static const NimStringV2 TM__6NbDwwj5FY059b1gz2AsAZQ_12 = {1, (NimStrPayload*)&TM__6NbDwwj5FY059b1gz2AsAZQ_11};
|
|
static const struct {
|
|
NI cap; NIM_CHAR data[2+1];
|
|
} TM__6NbDwwj5FY059b1gz2AsAZQ_13 = { 2 | NIM_STRLIT_FLAG, "PM" };
|
|
static const NimStringV2 TM__6NbDwwj5FY059b1gz2AsAZQ_14 = {2, (NimStrPayload*)&TM__6NbDwwj5FY059b1gz2AsAZQ_13};
|
|
static const struct {
|
|
NI cap; NIM_CHAR data[2+1];
|
|
} TM__6NbDwwj5FY059b1gz2AsAZQ_15 = { 2 | NIM_STRLIT_FLAG, "AM" };
|
|
static const NimStringV2 TM__6NbDwwj5FY059b1gz2AsAZQ_16 = {2, (NimStrPayload*)&TM__6NbDwwj5FY059b1gz2AsAZQ_15};
|
|
static const struct {
|
|
NI cap; NIM_CHAR data[7+1];
|
|
} TM__6NbDwwj5FY059b1gz2AsAZQ_17 = { 7 | NIM_STRLIT_FLAG, "Etc/UTC" };
|
|
static const NimStringV2 TM__6NbDwwj5FY059b1gz2AsAZQ_18 = {7, (NimStrPayload*)&TM__6NbDwwj5FY059b1gz2AsAZQ_17};
|
|
static const struct {
|
|
NI cap; NIM_CHAR data[1+1];
|
|
} TM__6NbDwwj5FY059b1gz2AsAZQ_19 = { 1 | NIM_STRLIT_FLAG, ":" };
|
|
static const NimStringV2 TM__6NbDwwj5FY059b1gz2AsAZQ_20 = {1, (NimStrPayload*)&TM__6NbDwwj5FY059b1gz2AsAZQ_19};
|
|
static const NimStringV2 TM__6NbDwwj5FY059b1gz2AsAZQ_21 = {0, (NimStrPayload*)&TM__6NbDwwj5FY059b1gz2AsAZQ_4};
|
|
static const NimStringV2 TM__6NbDwwj5FY059b1gz2AsAZQ_22 = {1, (NimStrPayload*)&TM__6NbDwwj5FY059b1gz2AsAZQ_19};
|
|
static const NimStringV2 TM__6NbDwwj5FY059b1gz2AsAZQ_23 = {0, (NimStrPayload*)&TM__6NbDwwj5FY059b1gz2AsAZQ_4};
|
|
static const struct {
|
|
NI cap; NIM_CHAR data[2+1];
|
|
} TM__6NbDwwj5FY059b1gz2AsAZQ_24 = { 2 | NIM_STRLIT_FLAG, "BC" };
|
|
static const NimStringV2 TM__6NbDwwj5FY059b1gz2AsAZQ_25 = {2, (NimStrPayload*)&TM__6NbDwwj5FY059b1gz2AsAZQ_24};
|
|
static const struct {
|
|
NI cap; NIM_CHAR data[2+1];
|
|
} TM__6NbDwwj5FY059b1gz2AsAZQ_26 = { 2 | NIM_STRLIT_FLAG, "AD" };
|
|
static const NimStringV2 TM__6NbDwwj5FY059b1gz2AsAZQ_27 = {2, (NimStrPayload*)&TM__6NbDwwj5FY059b1gz2AsAZQ_26};
|
|
static const struct {
|
|
NI cap; NU8 data[9];
|
|
} TM__6NbDwwj5FY059b1gz2AsAZQ_28 = {9 | NIM_STRLIT_FLAG, {((NU8)22),
|
|
((NU8)33),
|
|
((NU8)1),
|
|
((NU8)45),
|
|
((NU8)11),
|
|
((NU8)33),
|
|
((NU8)1),
|
|
((NU8)45),
|
|
((NU8)1)}};
|
|
static const struct {
|
|
NI cap; NIM_CHAR data[10+1];
|
|
} TM__6NbDwwj5FY059b1gz2AsAZQ_29 = { 10 | NIM_STRLIT_FLAG, "yyyy-MM-dd" };
|
|
static const struct {
|
|
NI cap; NIM_CHAR data[3+1];
|
|
} TM__6NbDwwj5FY059b1gz2AsAZQ_30 = { 3 | NIM_STRLIT_FLAG, "Jan" };
|
|
static const struct {
|
|
NI cap; NIM_CHAR data[3+1];
|
|
} TM__6NbDwwj5FY059b1gz2AsAZQ_31 = { 3 | NIM_STRLIT_FLAG, "Feb" };
|
|
static const struct {
|
|
NI cap; NIM_CHAR data[3+1];
|
|
} TM__6NbDwwj5FY059b1gz2AsAZQ_32 = { 3 | NIM_STRLIT_FLAG, "Mar" };
|
|
static const struct {
|
|
NI cap; NIM_CHAR data[3+1];
|
|
} TM__6NbDwwj5FY059b1gz2AsAZQ_33 = { 3 | NIM_STRLIT_FLAG, "Apr" };
|
|
static const struct {
|
|
NI cap; NIM_CHAR data[3+1];
|
|
} TM__6NbDwwj5FY059b1gz2AsAZQ_34 = { 3 | NIM_STRLIT_FLAG, "May" };
|
|
static const struct {
|
|
NI cap; NIM_CHAR data[3+1];
|
|
} TM__6NbDwwj5FY059b1gz2AsAZQ_35 = { 3 | NIM_STRLIT_FLAG, "Jun" };
|
|
static const struct {
|
|
NI cap; NIM_CHAR data[3+1];
|
|
} TM__6NbDwwj5FY059b1gz2AsAZQ_36 = { 3 | NIM_STRLIT_FLAG, "Jul" };
|
|
static const struct {
|
|
NI cap; NIM_CHAR data[3+1];
|
|
} TM__6NbDwwj5FY059b1gz2AsAZQ_37 = { 3 | NIM_STRLIT_FLAG, "Aug" };
|
|
static const struct {
|
|
NI cap; NIM_CHAR data[3+1];
|
|
} TM__6NbDwwj5FY059b1gz2AsAZQ_38 = { 3 | NIM_STRLIT_FLAG, "Sep" };
|
|
static const struct {
|
|
NI cap; NIM_CHAR data[3+1];
|
|
} TM__6NbDwwj5FY059b1gz2AsAZQ_39 = { 3 | NIM_STRLIT_FLAG, "Oct" };
|
|
static const struct {
|
|
NI cap; NIM_CHAR data[3+1];
|
|
} TM__6NbDwwj5FY059b1gz2AsAZQ_40 = { 3 | NIM_STRLIT_FLAG, "Nov" };
|
|
static const struct {
|
|
NI cap; NIM_CHAR data[3+1];
|
|
} TM__6NbDwwj5FY059b1gz2AsAZQ_41 = { 3 | NIM_STRLIT_FLAG, "Dec" };
|
|
static const struct {
|
|
NI cap; NIM_CHAR data[7+1];
|
|
} TM__6NbDwwj5FY059b1gz2AsAZQ_42 = { 7 | NIM_STRLIT_FLAG, "January" };
|
|
static const struct {
|
|
NI cap; NIM_CHAR data[8+1];
|
|
} TM__6NbDwwj5FY059b1gz2AsAZQ_43 = { 8 | NIM_STRLIT_FLAG, "February" };
|
|
static const struct {
|
|
NI cap; NIM_CHAR data[5+1];
|
|
} TM__6NbDwwj5FY059b1gz2AsAZQ_44 = { 5 | NIM_STRLIT_FLAG, "March" };
|
|
static const struct {
|
|
NI cap; NIM_CHAR data[5+1];
|
|
} TM__6NbDwwj5FY059b1gz2AsAZQ_45 = { 5 | NIM_STRLIT_FLAG, "April" };
|
|
static const struct {
|
|
NI cap; NIM_CHAR data[4+1];
|
|
} TM__6NbDwwj5FY059b1gz2AsAZQ_46 = { 4 | NIM_STRLIT_FLAG, "June" };
|
|
static const struct {
|
|
NI cap; NIM_CHAR data[4+1];
|
|
} TM__6NbDwwj5FY059b1gz2AsAZQ_47 = { 4 | NIM_STRLIT_FLAG, "July" };
|
|
static const struct {
|
|
NI cap; NIM_CHAR data[6+1];
|
|
} TM__6NbDwwj5FY059b1gz2AsAZQ_48 = { 6 | NIM_STRLIT_FLAG, "August" };
|
|
static const struct {
|
|
NI cap; NIM_CHAR data[9+1];
|
|
} TM__6NbDwwj5FY059b1gz2AsAZQ_49 = { 9 | NIM_STRLIT_FLAG, "September" };
|
|
static const struct {
|
|
NI cap; NIM_CHAR data[7+1];
|
|
} TM__6NbDwwj5FY059b1gz2AsAZQ_50 = { 7 | NIM_STRLIT_FLAG, "October" };
|
|
static const struct {
|
|
NI cap; NIM_CHAR data[8+1];
|
|
} TM__6NbDwwj5FY059b1gz2AsAZQ_51 = { 8 | NIM_STRLIT_FLAG, "November" };
|
|
static const struct {
|
|
NI cap; NIM_CHAR data[8+1];
|
|
} TM__6NbDwwj5FY059b1gz2AsAZQ_52 = { 8 | NIM_STRLIT_FLAG, "December" };
|
|
static const struct {
|
|
NI cap; NIM_CHAR data[3+1];
|
|
} TM__6NbDwwj5FY059b1gz2AsAZQ_53 = { 3 | NIM_STRLIT_FLAG, "Mon" };
|
|
static const struct {
|
|
NI cap; NIM_CHAR data[3+1];
|
|
} TM__6NbDwwj5FY059b1gz2AsAZQ_54 = { 3 | NIM_STRLIT_FLAG, "Tue" };
|
|
static const struct {
|
|
NI cap; NIM_CHAR data[3+1];
|
|
} TM__6NbDwwj5FY059b1gz2AsAZQ_55 = { 3 | NIM_STRLIT_FLAG, "Wed" };
|
|
static const struct {
|
|
NI cap; NIM_CHAR data[3+1];
|
|
} TM__6NbDwwj5FY059b1gz2AsAZQ_56 = { 3 | NIM_STRLIT_FLAG, "Thu" };
|
|
static const struct {
|
|
NI cap; NIM_CHAR data[3+1];
|
|
} TM__6NbDwwj5FY059b1gz2AsAZQ_57 = { 3 | NIM_STRLIT_FLAG, "Fri" };
|
|
static const struct {
|
|
NI cap; NIM_CHAR data[3+1];
|
|
} TM__6NbDwwj5FY059b1gz2AsAZQ_58 = { 3 | NIM_STRLIT_FLAG, "Sat" };
|
|
static const struct {
|
|
NI cap; NIM_CHAR data[3+1];
|
|
} TM__6NbDwwj5FY059b1gz2AsAZQ_59 = { 3 | NIM_STRLIT_FLAG, "Sun" };
|
|
static const struct {
|
|
NI cap; NIM_CHAR data[6+1];
|
|
} TM__6NbDwwj5FY059b1gz2AsAZQ_60 = { 6 | NIM_STRLIT_FLAG, "Monday" };
|
|
static const struct {
|
|
NI cap; NIM_CHAR data[7+1];
|
|
} TM__6NbDwwj5FY059b1gz2AsAZQ_61 = { 7 | NIM_STRLIT_FLAG, "Tuesday" };
|
|
static const struct {
|
|
NI cap; NIM_CHAR data[9+1];
|
|
} TM__6NbDwwj5FY059b1gz2AsAZQ_62 = { 9 | NIM_STRLIT_FLAG, "Wednesday" };
|
|
static const struct {
|
|
NI cap; NIM_CHAR data[8+1];
|
|
} TM__6NbDwwj5FY059b1gz2AsAZQ_63 = { 8 | NIM_STRLIT_FLAG, "Thursday" };
|
|
static const struct {
|
|
NI cap; NIM_CHAR data[6+1];
|
|
} TM__6NbDwwj5FY059b1gz2AsAZQ_64 = { 6 | NIM_STRLIT_FLAG, "Friday" };
|
|
static const struct {
|
|
NI cap; NIM_CHAR data[8+1];
|
|
} TM__6NbDwwj5FY059b1gz2AsAZQ_65 = { 8 | NIM_STRLIT_FLAG, "Saturday" };
|
|
static const struct {
|
|
NI cap; NIM_CHAR data[6+1];
|
|
} TM__6NbDwwj5FY059b1gz2AsAZQ_66 = { 6 | NIM_STRLIT_FLAG, "Sunday" };
|
|
static const NimStringV2 TM__6NbDwwj5FY059b1gz2AsAZQ_68 = {7, (NimStrPayload*)&TM__6NbDwwj5FY059b1gz2AsAZQ_17};
|
|
static const struct {
|
|
NI cap; NU8 data[9];
|
|
} TM__6NbDwwj5FY059b1gz2AsAZQ_71 = {9 | NIM_STRLIT_FLAG, {((NU8)7),
|
|
((NU8)33),
|
|
((NU8)1),
|
|
((NU8)58),
|
|
((NU8)9),
|
|
((NU8)33),
|
|
((NU8)1),
|
|
((NU8)58),
|
|
((NU8)15)}};
|
|
static const struct {
|
|
NI cap; NIM_CHAR data[8+1];
|
|
} TM__6NbDwwj5FY059b1gz2AsAZQ_72 = { 8 | NIM_STRLIT_FLAG, "HH:mm:ss" };
|
|
static const struct {
|
|
NI cap; NIM_CHAR data[5+1];
|
|
} TM__6NbDwwj5FY059b1gz2AsAZQ_73 = { 5 | NIM_STRLIT_FLAG, "LOCAL" };
|
|
static const NimStringV2 TM__6NbDwwj5FY059b1gz2AsAZQ_74 = {5, (NimStrPayload*)&TM__6NbDwwj5FY059b1gz2AsAZQ_73};
|
|
static const struct {
|
|
NI cap; NU8 data[16];
|
|
} TM__6NbDwwj5FY059b1gz2AsAZQ_77 = {16 | NIM_STRLIT_FLAG, {((NU8)13),
|
|
((NU8)33),
|
|
((NU8)1),
|
|
((NU8)45),
|
|
((NU8)22),
|
|
((NU8)33),
|
|
((NU8)1),
|
|
((NU8)45),
|
|
((NU8)7),
|
|
((NU8)33),
|
|
((NU8)1),
|
|
((NU8)45),
|
|
((NU8)9),
|
|
((NU8)33),
|
|
((NU8)1),
|
|
((NU8)45)}};
|
|
static const struct {
|
|
NI cap; NIM_CHAR data[16+1];
|
|
} TM__6NbDwwj5FY059b1gz2AsAZQ_78 = { 16 | NIM_STRLIT_FLAG, "MMMM-yyyy-HH-mm-" };
|
|
N_LIB_PRIVATE NIM_CONST tyArray__pDfjTbtkTNjmi9bTcaNV32Q unitWeights__pureZtimes_112 = {IL64(1),
|
|
IL64(1000),
|
|
IL64(1000000),
|
|
IL64(1000000000),
|
|
IL64(60000000000),
|
|
IL64(3600000000000),
|
|
IL64(86400000000000),
|
|
IL64(604800000000000)}
|
|
;
|
|
N_LIB_PRIVATE NIM_CONST tyObject_TimeFormat__Nsh4TB3AD6ERMz3D74BTxA f2__options_609 = {{9, (tySequence__6H5Oh5UUvVCLiakt9aTwtUQ_Content*)&TM__6NbDwwj5FY059b1gz2AsAZQ_28}, {10, (NimStrPayload*)&TM__6NbDwwj5FY059b1gz2AsAZQ_29}}
|
|
;
|
|
N_LIB_PRIVATE NIM_CONST tyObject_DateTimeLocale__uNv3Dc4hHpAREXnLVqGWZQ DefaultLocale__pureZtimes_1852 = {{{3, (NimStrPayload*)&TM__6NbDwwj5FY059b1gz2AsAZQ_30},
|
|
{3, (NimStrPayload*)&TM__6NbDwwj5FY059b1gz2AsAZQ_31},
|
|
{3, (NimStrPayload*)&TM__6NbDwwj5FY059b1gz2AsAZQ_32},
|
|
{3, (NimStrPayload*)&TM__6NbDwwj5FY059b1gz2AsAZQ_33},
|
|
{3, (NimStrPayload*)&TM__6NbDwwj5FY059b1gz2AsAZQ_34},
|
|
{3, (NimStrPayload*)&TM__6NbDwwj5FY059b1gz2AsAZQ_35},
|
|
{3, (NimStrPayload*)&TM__6NbDwwj5FY059b1gz2AsAZQ_36},
|
|
{3, (NimStrPayload*)&TM__6NbDwwj5FY059b1gz2AsAZQ_37},
|
|
{3, (NimStrPayload*)&TM__6NbDwwj5FY059b1gz2AsAZQ_38},
|
|
{3, (NimStrPayload*)&TM__6NbDwwj5FY059b1gz2AsAZQ_39},
|
|
{3, (NimStrPayload*)&TM__6NbDwwj5FY059b1gz2AsAZQ_40},
|
|
{3, (NimStrPayload*)&TM__6NbDwwj5FY059b1gz2AsAZQ_41}}
|
|
, {{7, (NimStrPayload*)&TM__6NbDwwj5FY059b1gz2AsAZQ_42},
|
|
{8, (NimStrPayload*)&TM__6NbDwwj5FY059b1gz2AsAZQ_43},
|
|
{5, (NimStrPayload*)&TM__6NbDwwj5FY059b1gz2AsAZQ_44},
|
|
{5, (NimStrPayload*)&TM__6NbDwwj5FY059b1gz2AsAZQ_45},
|
|
{3, (NimStrPayload*)&TM__6NbDwwj5FY059b1gz2AsAZQ_34},
|
|
{4, (NimStrPayload*)&TM__6NbDwwj5FY059b1gz2AsAZQ_46},
|
|
{4, (NimStrPayload*)&TM__6NbDwwj5FY059b1gz2AsAZQ_47},
|
|
{6, (NimStrPayload*)&TM__6NbDwwj5FY059b1gz2AsAZQ_48},
|
|
{9, (NimStrPayload*)&TM__6NbDwwj5FY059b1gz2AsAZQ_49},
|
|
{7, (NimStrPayload*)&TM__6NbDwwj5FY059b1gz2AsAZQ_50},
|
|
{8, (NimStrPayload*)&TM__6NbDwwj5FY059b1gz2AsAZQ_51},
|
|
{8, (NimStrPayload*)&TM__6NbDwwj5FY059b1gz2AsAZQ_52}}
|
|
, {{3, (NimStrPayload*)&TM__6NbDwwj5FY059b1gz2AsAZQ_53},
|
|
{3, (NimStrPayload*)&TM__6NbDwwj5FY059b1gz2AsAZQ_54},
|
|
{3, (NimStrPayload*)&TM__6NbDwwj5FY059b1gz2AsAZQ_55},
|
|
{3, (NimStrPayload*)&TM__6NbDwwj5FY059b1gz2AsAZQ_56},
|
|
{3, (NimStrPayload*)&TM__6NbDwwj5FY059b1gz2AsAZQ_57},
|
|
{3, (NimStrPayload*)&TM__6NbDwwj5FY059b1gz2AsAZQ_58},
|
|
{3, (NimStrPayload*)&TM__6NbDwwj5FY059b1gz2AsAZQ_59}}
|
|
, {{6, (NimStrPayload*)&TM__6NbDwwj5FY059b1gz2AsAZQ_60},
|
|
{7, (NimStrPayload*)&TM__6NbDwwj5FY059b1gz2AsAZQ_61},
|
|
{9, (NimStrPayload*)&TM__6NbDwwj5FY059b1gz2AsAZQ_62},
|
|
{8, (NimStrPayload*)&TM__6NbDwwj5FY059b1gz2AsAZQ_63},
|
|
{6, (NimStrPayload*)&TM__6NbDwwj5FY059b1gz2AsAZQ_64},
|
|
{8, (NimStrPayload*)&TM__6NbDwwj5FY059b1gz2AsAZQ_65},
|
|
{6, (NimStrPayload*)&TM__6NbDwwj5FY059b1gz2AsAZQ_66}}
|
|
}
|
|
;
|
|
N_LIB_PRIVATE NIM_CONST tyArray__Splpnswz3rudLg9bDsQoDXg daysUntilMonthLeap__pureZtimes_253 = {((NI)0),
|
|
((NI)31),
|
|
((NI)60),
|
|
((NI)91),
|
|
((NI)121),
|
|
((NI)152),
|
|
((NI)182),
|
|
((NI)213),
|
|
((NI)244),
|
|
((NI)274),
|
|
((NI)305),
|
|
((NI)335)}
|
|
;
|
|
N_LIB_PRIVATE NIM_CONST tyArray__Splpnswz3rudLg9bDsQoDXg daysUntilMonth__pureZtimes_252 = {((NI)0),
|
|
((NI)31),
|
|
((NI)59),
|
|
((NI)90),
|
|
((NI)120),
|
|
((NI)151),
|
|
((NI)181),
|
|
((NI)212),
|
|
((NI)243),
|
|
((NI)273),
|
|
((NI)304),
|
|
((NI)334)}
|
|
;
|
|
N_LIB_PRIVATE NIM_CONST tyObject_TimeFormat__Nsh4TB3AD6ERMz3D74BTxA f2__options_617 = {{9, (tySequence__6H5Oh5UUvVCLiakt9aTwtUQ_Content*)&TM__6NbDwwj5FY059b1gz2AsAZQ_71}, {8, (NimStrPayload*)&TM__6NbDwwj5FY059b1gz2AsAZQ_72}}
|
|
;
|
|
N_LIB_PRIVATE NIM_CONST tyObject_TimeFormat__Nsh4TB3AD6ERMz3D74BTxA f2__extccomp_1269 = {{16, (tySequence__6H5Oh5UUvVCLiakt9aTwtUQ_Content*)&TM__6NbDwwj5FY059b1gz2AsAZQ_77}, {16, (NimStrPayload*)&TM__6NbDwwj5FY059b1gz2AsAZQ_78}}
|
|
;
|
|
N_LIB_PRIVATE tyObject_TimezonecolonObjectType___F8OvqlxXyGXRSiK9c1fCDVw* utcInstance__pureZtimes_1655;
|
|
N_LIB_PRIVATE tyObject_TimezonecolonObjectType___F8OvqlxXyGXRSiK9c1fCDVw* localInstance__pureZtimes_1656;
|
|
extern NIM_BOOL nimInErrorMode__system_3980;
|
|
static NIM_CONST NU32 TM__6NbDwwj5FY059b1gz2AsAZQ_2[1] = {3283069440};
|
|
N_LIB_PRIVATE TNimTypeV2 NTIv2__F8OvqlxXyGXRSiK9c1fCDVw_ = {.destructor = (void*)eqdestroy___pureZtimes_1300, .size = sizeof(tyObject_TimezonecolonObjectType___F8OvqlxXyGXRSiK9c1fCDVw), .align = (NI16) NIM_ALIGNOF(tyObject_TimezonecolonObjectType___F8OvqlxXyGXRSiK9c1fCDVw), .depth = 0, .display = TM__6NbDwwj5FY059b1gz2AsAZQ_2, .traceImpl = (void*)eqtrace___pureZtimes_1309, .flags = 0};
|
|
static NIM_CONST NU32 TM__6NbDwwj5FY059b1gz2AsAZQ_3[2] = {3701606400, 4072654848};
|
|
N_LIB_PRIVATE TNimTypeV2 NTIv2__d9cK9cyKZPJJxFXUmx8dSpPw_ = {.destructor = (void*)eqdestroy___pureZtimes_1412, .size = sizeof(tyObject_DateTime__d9cK9cyKZPJJxFXUmx8dSpPw), .align = (NI16) NIM_ALIGNOF(tyObject_DateTime__d9cK9cyKZPJJxFXUmx8dSpPw), .depth = 1, .display = TM__6NbDwwj5FY059b1gz2AsAZQ_3, .traceImpl = (void*)eqtrace___pureZtimes_1421, .flags = 0};
|
|
static N_INLINE(void, nimSetMem__systemZmemory_7)(void* a, int v, NI size) {
|
|
void* T1_;
|
|
T1_ = (void*)0;
|
|
T1_ = memset(a, v, ((size_t) (size)));
|
|
}
|
|
static N_INLINE(NIM_BOOL*, nimErrorFlag)(void) {
|
|
NIM_BOOL* result;
|
|
result = (NIM_BOOL*)0;
|
|
result = (&nimInErrorMode__system_3980);
|
|
return result;
|
|
}
|
|
static N_INLINE(void, nimZeroMem)(void* p, NI size) {
|
|
NIM_BOOL* nimErr_;
|
|
{nimErr_ = nimErrorFlag();
|
|
nimSetMem__systemZmemory_7(p, ((int)0), size);
|
|
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
|
|
}BeforeRet_: ;
|
|
}
|
|
static N_INLINE(NF, toFloat__system_1672)(NI i) {
|
|
NF result;
|
|
result = (NF)0;
|
|
result = ((NF) (i));
|
|
return result;
|
|
}
|
|
N_LIB_PRIVATE N_NIMCALL(NF, cpuTime__pureZtimes_4290)(void) {
|
|
NF result;
|
|
struct timespec ts;
|
|
int T1_;
|
|
NF T2_;
|
|
NF T3_;
|
|
result = (NF)0;
|
|
nimZeroMem((void*)(&ts), sizeof(struct timespec));
|
|
T1_ = (int)0;
|
|
T1_ = clock_gettime(((int)3), (&ts));
|
|
(void)(T1_);
|
|
T2_ = (NF)0;
|
|
T2_ = toFloat__system_1672(ts.tv_sec);
|
|
T3_ = (NF)0;
|
|
T3_ = toFloat__system_1672(ts.tv_nsec);
|
|
result = ((NF)(T2_) + (NF)(((NF)(T3_) / (NF)(1000000000.0))));
|
|
return result;
|
|
}
|
|
N_LIB_PRIVATE N_NIMCALL(tyObject_Time__3y2ZpqsTJLqdZvpC9a0rU2Q, initTime__pureZtimes_1013)(NI64 unix_0, NI nanosecond) {
|
|
tyObject_Time__3y2ZpqsTJLqdZvpC9a0rU2Q result;
|
|
nimZeroMem((void*)(&result), sizeof(tyObject_Time__3y2ZpqsTJLqdZvpC9a0rU2Q));
|
|
result.seconds = unix_0;
|
|
result.nanosecond = nanosecond;
|
|
return result;
|
|
}
|
|
N_LIB_PRIVATE N_NIMCALL(tyObject_Time__3y2ZpqsTJLqdZvpC9a0rU2Q, getTime__pureZtimes_1086)(void) {
|
|
tyObject_Time__3y2ZpqsTJLqdZvpC9a0rU2Q result;
|
|
struct timespec ts;
|
|
int T1_;
|
|
NIM_BOOL* nimErr_;
|
|
{nimErr_ = nimErrorFlag();
|
|
nimZeroMem((void*)(&result), sizeof(tyObject_Time__3y2ZpqsTJLqdZvpC9a0rU2Q));
|
|
T1_ = (int)0;
|
|
T1_ = clock_gettime(((int)0), (&ts));
|
|
(void)(T1_);
|
|
result = initTime__pureZtimes_1013(((NI64) (ts.tv_sec)), ((NI) (ts.tv_nsec)));
|
|
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
|
|
}BeforeRet_: ;
|
|
return result;
|
|
}
|
|
static N_INLINE(NI, minuspercent___system_790)(NI x, NI y) {
|
|
NI result;
|
|
result = (NI)0;
|
|
result = ((NI) ((NU)((NU64)(((NU) (x))) - (NU64)(((NU) (y))))));
|
|
return result;
|
|
}
|
|
static N_INLINE(NIM_BOOL, nimDecRefIsLastCyclicStatic)(void* p, TNimTypeV2* desc) {
|
|
NIM_BOOL result;
|
|
NIM_BOOL* nimErr_;
|
|
{nimErr_ = nimErrorFlag();
|
|
result = (NIM_BOOL)0;
|
|
{
|
|
tyObject_RefHeader__Gi7WQzlT1ZRToh9a2ueYb4A* cell;
|
|
NI T5_;
|
|
if (!!((p == NIM_NIL))) goto LA3_;
|
|
T5_ = (NI)0;
|
|
T5_ = minuspercent___system_790(((NI) (ptrdiff_t) (p)), ((NI)16));
|
|
cell = ((tyObject_RefHeader__Gi7WQzlT1ZRToh9a2ueYb4A*) (T5_));
|
|
{
|
|
if (!((NI)((*cell).rc & ((NI)-16)) == ((NI)0))) goto LA8_;
|
|
result = NIM_TRUE;
|
|
}
|
|
goto LA6_;
|
|
LA8_: ;
|
|
{
|
|
(*cell).rc -= ((NI)16);
|
|
}
|
|
LA6_: ;
|
|
rememberCycle__system_3143(result, cell, desc);
|
|
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
|
|
}
|
|
LA3_: ;
|
|
}BeforeRet_: ;
|
|
return result;
|
|
}
|
|
static N_INLINE(NIM_BOOL, nimDecRefIsLastCyclicDyn)(void* p) {
|
|
NIM_BOOL result;
|
|
NIM_BOOL* nimErr_;
|
|
{nimErr_ = nimErrorFlag();
|
|
result = (NIM_BOOL)0;
|
|
{
|
|
tyObject_RefHeader__Gi7WQzlT1ZRToh9a2ueYb4A* cell;
|
|
NI T5_;
|
|
if (!!((p == NIM_NIL))) goto LA3_;
|
|
T5_ = (NI)0;
|
|
T5_ = minuspercent___system_790(((NI) (ptrdiff_t) (p)), ((NI)16));
|
|
cell = ((tyObject_RefHeader__Gi7WQzlT1ZRToh9a2ueYb4A*) (T5_));
|
|
{
|
|
if (!((NI)((*cell).rc & ((NI)-16)) == ((NI)0))) goto LA8_;
|
|
result = NIM_TRUE;
|
|
}
|
|
goto LA6_;
|
|
LA8_: ;
|
|
{
|
|
(*cell).rc -= ((NI)16);
|
|
}
|
|
LA6_: ;
|
|
rememberCycle__system_3143(result, cell, (*((TNimTypeV2**) (p))));
|
|
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
|
|
}
|
|
LA3_: ;
|
|
}BeforeRet_: ;
|
|
return result;
|
|
}
|
|
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___pureZtimes_1300)(tyObject_TimezonecolonObjectType___F8OvqlxXyGXRSiK9c1fCDVw* dest) {
|
|
{
|
|
NIM_BOOL T3_;
|
|
T3_ = (NIM_BOOL)0;
|
|
T3_ = nimDecRefIsLastCyclicDyn((*dest).zonedTimeFromTimeImpl.ClE_0);
|
|
if (!T3_) goto LA4_;
|
|
nimDestroyAndDispose((*dest).zonedTimeFromTimeImpl.ClE_0);
|
|
}
|
|
LA4_: ;
|
|
{
|
|
NIM_BOOL T8_;
|
|
T8_ = (NIM_BOOL)0;
|
|
T8_ = nimDecRefIsLastCyclicDyn((*dest).zonedTimeFromAdjTimeImpl.ClE_0);
|
|
if (!T8_) goto LA9_;
|
|
nimDestroyAndDispose((*dest).zonedTimeFromAdjTimeImpl.ClE_0);
|
|
}
|
|
LA9_: ;
|
|
eqdestroy___stdZassertions_13((&(*dest).name));
|
|
}
|
|
static N_INLINE(void, nimCopyMem)(void* dest, void* source, NI size) {
|
|
void* T1_;
|
|
T1_ = (void*)0;
|
|
T1_ = memcpy(dest, source, ((size_t) (size)));
|
|
}
|
|
static N_INLINE(void, copyMem__system_1719)(void* dest, void* source, NI size) {
|
|
nimCopyMem(dest, source, size);
|
|
}
|
|
static N_INLINE(void, add__system_2688)(tyObject_CellSeq__sGle0igznE2T7vk4dBh5SQ* s, void** c, TNimTypeV2* t) {
|
|
void** colontmp_;
|
|
TNimTypeV2* colontmp__2;
|
|
{
|
|
tyTuple__N4J9cV4JZGem3ljqqj5rT0Q* d;
|
|
void* T5_;
|
|
if (!((*s).cap <= (*s).len)) goto LA3_;
|
|
(*s).cap = (NI)((NI)((*s).cap * ((NI)3)) / ((NI)2));
|
|
T5_ = (void*)0;
|
|
T5_ = allocImpl__system_1735(((NI) ((NI)((*s).cap * ((NI)16)))));
|
|
d = ((tyTuple__N4J9cV4JZGem3ljqqj5rT0Q*) (T5_));
|
|
copyMem__system_1719(((void*) (d)), ((void*) ((*s).d)), ((NI) ((NI)((*s).len * ((NI)16)))));
|
|
dealloc(((void*) ((*s).d)));
|
|
(*s).d = d;
|
|
}
|
|
LA3_: ;
|
|
colontmp_ = c;
|
|
colontmp__2 = t;
|
|
(*s).d[(*s).len].Field0 = colontmp_;
|
|
(*s).d[(*s).len].Field1 = colontmp__2;
|
|
(*s).len += ((NI)1);
|
|
}
|
|
static N_INLINE(void, nimTraceRefDyn)(void* q, void* env) {
|
|
void** p;
|
|
p = ((void**) (q));
|
|
{
|
|
tyObject_GcEnv__g0b9ao2MXcYnUpu9b4I8eP9bQ* j;
|
|
if (!!(((*p) == NIM_NIL))) goto LA3_;
|
|
j = ((tyObject_GcEnv__g0b9ao2MXcYnUpu9b4I8eP9bQ*) (env));
|
|
add__system_2688((&(*j).traceStack), p, (*((TNimTypeV2**) ((*p)))));
|
|
}
|
|
LA3_: ;
|
|
}
|
|
N_LIB_PRIVATE N_NIMCALL(void, eqtrace___pureZtimes_1309)(tyObject_TimezonecolonObjectType___F8OvqlxXyGXRSiK9c1fCDVw* dest, void* env) {
|
|
nimTraceRefDyn((&(*dest).zonedTimeFromTimeImpl.ClE_0), env);
|
|
nimTraceRefDyn((&(*dest).zonedTimeFromAdjTimeImpl.ClE_0), env);
|
|
}
|
|
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___pureZtimes_1412)(tyObject_DateTime__d9cK9cyKZPJJxFXUmx8dSpPw* dest) {
|
|
{
|
|
NIM_BOOL T3_;
|
|
T3_ = (NIM_BOOL)0;
|
|
T3_ = nimDecRefIsLastCyclicStatic((*dest).timezone, (&NTIv2__F8OvqlxXyGXRSiK9c1fCDVw_));
|
|
if (!T3_) goto LA4_;
|
|
eqdestroy___pureZtimes_1300((*dest).timezone);
|
|
nimRawDispose((*dest).timezone, ((NI)8));
|
|
}
|
|
LA4_: ;
|
|
}
|
|
static N_INLINE(void, nimTraceRef)(void* q, TNimTypeV2* desc, void* env) {
|
|
void** p;
|
|
p = ((void**) (q));
|
|
{
|
|
tyObject_GcEnv__g0b9ao2MXcYnUpu9b4I8eP9bQ* j;
|
|
if (!!(((*p) == NIM_NIL))) goto LA3_;
|
|
j = ((tyObject_GcEnv__g0b9ao2MXcYnUpu9b4I8eP9bQ*) (env));
|
|
add__system_2688((&(*j).traceStack), p, desc);
|
|
}
|
|
LA3_: ;
|
|
}
|
|
N_LIB_PRIVATE N_NIMCALL(void, eqtrace___pureZtimes_1421)(tyObject_DateTime__d9cK9cyKZPJJxFXUmx8dSpPw* dest, void* env) {
|
|
nimTraceRef(&(*dest).timezone, (&NTIv2__F8OvqlxXyGXRSiK9c1fCDVw_), env);
|
|
}
|
|
static N_INLINE(void, nimAddCharV1)(NimStringV2* s, NIM_CHAR c) {
|
|
prepareAdd(s, ((NI)1));
|
|
(*(*s).p).data[(*s).len] = c;
|
|
(*(*s).p).data[(NI)((*s).len + ((NI)1))] = 0;
|
|
(*s).len += ((NI)1);
|
|
}
|
|
static N_INLINE(NI, monthday__pureZtimes_1245)(tyObject_DateTime__d9cK9cyKZPJJxFXUmx8dSpPw* dt) {
|
|
NI result;
|
|
result = (NI)0;
|
|
result = ((NI) ((*dt).monthdayZero));
|
|
return result;
|
|
}
|
|
static N_INLINE(void, appendString)(NimStringV2* dest, NimStringV2 src) {
|
|
{
|
|
if (!(((NI)0) < src.len)) goto LA3_;
|
|
copyMem__system_1719(((void*) ((&(*(*dest).p).data[(*dest).len]))), ((void*) ((&(*src.p).data[((NI)0)]))), ((NI) ((NI)(src.len + ((NI)1)))));
|
|
(*dest).len += src.len;
|
|
}
|
|
LA3_: ;
|
|
}
|
|
N_LIB_PRIVATE N_NIMCALL(tyEnum_Month__JS0JuFvCBbC2GL3xXBnPQw, month__pureZtimes_1251)(tyObject_DateTime__d9cK9cyKZPJJxFXUmx8dSpPw* dt) {
|
|
tyEnum_Month__JS0JuFvCBbC2GL3xXBnPQw result;
|
|
result = (tyEnum_Month__JS0JuFvCBbC2GL3xXBnPQw)0;
|
|
result = ((tyEnum_Month__JS0JuFvCBbC2GL3xXBnPQw) ((*dt).monthZero));
|
|
return result;
|
|
}
|
|
static N_INLINE(NI, convert__pureZtimes_751)(tyEnum_TimeUnit__52alPn04ElUUbqLeok9b3PQ unitFrom, tyEnum_TimeUnit__52alPn04ElUUbqLeok9b3PQ unitTo, NI quantity) {
|
|
NI result;
|
|
NI colontmpD_;
|
|
NI colontmpD__2;
|
|
result = (NI)0;
|
|
colontmpD_ = (NI)0;
|
|
colontmpD__2 = (NI)0;
|
|
{
|
|
if (!(unitFrom < unitTo)) goto LA3_;
|
|
colontmpD_ = ((NI) ((NI64)(((NI64) (quantity)) / (NI64)(unitWeights__pureZtimes_112[(unitTo)- 0] / unitWeights__pureZtimes_112[(unitFrom)- 0]))));
|
|
result = colontmpD_;
|
|
}
|
|
goto LA1_;
|
|
LA3_: ;
|
|
{
|
|
colontmpD__2 = ((NI) ((NI64)((NI64)(unitWeights__pureZtimes_112[(unitFrom)- 0] / unitWeights__pureZtimes_112[(unitTo)- 0]) * ((NI64) (quantity)))));
|
|
result = colontmpD__2;
|
|
}
|
|
LA1_: ;
|
|
return result;
|
|
}
|
|
static N_INLINE(void, appendChar)(NimStringV2* dest, NIM_CHAR c) {
|
|
(*(*dest).p).data[(*dest).len] = c;
|
|
(*(*dest).p).data[(NI)((*dest).len + ((NI)1))] = 0;
|
|
(*dest).len += ((NI)1);
|
|
}
|
|
static N_INLINE(int, nimCmpMem)(void* a, void* b, NI size) {
|
|
int result;
|
|
result = (int)0;
|
|
result = memcmp(a, b, ((size_t) (size)));
|
|
return result;
|
|
}
|
|
static N_INLINE(NIM_BOOL, equalMem__system_1727)(void* a, void* b, NI size) {
|
|
NIM_BOOL result;
|
|
int T1_;
|
|
result = (NIM_BOOL)0;
|
|
T1_ = (int)0;
|
|
T1_ = nimCmpMem(a, b, size);
|
|
result = (T1_ == ((NI32)0));
|
|
return result;
|
|
}
|
|
static N_INLINE(NIM_BOOL, eqStrings)(NimStringV2 a, NimStringV2 b) {
|
|
NIM_BOOL result;
|
|
NI alen;
|
|
NI blen;
|
|
{ result = (NIM_BOOL)0;
|
|
alen = a.len;
|
|
blen = b.len;
|
|
{
|
|
if (!(alen == blen)) goto LA3_;
|
|
{
|
|
if (!(alen == ((NI)0))) goto LA7_;
|
|
result = NIM_TRUE;
|
|
goto BeforeRet_;
|
|
}
|
|
LA7_: ;
|
|
result = equalMem__system_1727(((void*) ((&a.p->data[((NI)0)]))), ((void*) ((&b.p->data[((NI)0)]))), ((NI) (alen)));
|
|
goto BeforeRet_;
|
|
}
|
|
LA3_: ;
|
|
}BeforeRet_: ;
|
|
return result;
|
|
}
|
|
N_LIB_PRIVATE N_NIMCALL(NIM_BOOL, eqeq___pureZtimes_1500)(tyObject_TimezonecolonObjectType___F8OvqlxXyGXRSiK9c1fCDVw* zone1, tyObject_TimezonecolonObjectType___F8OvqlxXyGXRSiK9c1fCDVw* zone2) {
|
|
NIM_BOOL result;
|
|
{ result = (NIM_BOOL)0;
|
|
{
|
|
if (!(zone1 == zone2)) goto LA3_;
|
|
result = NIM_TRUE;
|
|
goto BeforeRet_;
|
|
}
|
|
LA3_: ;
|
|
{
|
|
NIM_BOOL T7_;
|
|
T7_ = (NIM_BOOL)0;
|
|
T7_ = (zone1 == 0);
|
|
if (T7_) goto LA8_;
|
|
T7_ = (zone2 == 0);
|
|
LA8_: ;
|
|
if (!T7_) goto LA9_;
|
|
result = NIM_FALSE;
|
|
goto BeforeRet_;
|
|
}
|
|
LA9_: ;
|
|
result = eqStrings((*zone1).name, (*zone2).name);
|
|
}BeforeRet_: ;
|
|
return result;
|
|
}
|
|
N_LIB_PRIVATE N_NIMCALL(void, formatPattern__pureZtimes_2365)(tyObject_DateTime__d9cK9cyKZPJJxFXUmx8dSpPw* dt, tyEnum_FormatPattern__asapJ9b4qGHESR0g3CfbCjQ pattern, NimStringV2* result, tyObject_DateTimeLocale__uNv3Dc4hHpAREXnLVqGWZQ* loc) {
|
|
NIM_BOOL* nimErr_;
|
|
{nimErr_ = nimErrorFlag();
|
|
switch (pattern) {
|
|
case ((tyEnum_FormatPattern__asapJ9b4qGHESR0g3CfbCjQ)0):
|
|
{
|
|
NimStringV2 colontmpD_;
|
|
NI T2_;
|
|
colontmpD_.len = 0; colontmpD_.p = NIM_NIL;
|
|
T2_ = (NI)0;
|
|
T2_ = monthday__pureZtimes_1245(dt);
|
|
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
|
|
colontmpD_ = dollar___systemZdollars_3(((NI) (T2_)));
|
|
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
|
|
prepareAdd((&(*result)), colontmpD_.len + 0);
|
|
appendString((&(*result)), colontmpD_);
|
|
eqdestroy___stdZassertions_13((&colontmpD_));
|
|
}
|
|
break;
|
|
case ((tyEnum_FormatPattern__asapJ9b4qGHESR0g3CfbCjQ)1):
|
|
{
|
|
NimStringV2 colontmpD__2;
|
|
NI T4_;
|
|
colontmpD__2.len = 0; colontmpD__2.p = NIM_NIL;
|
|
T4_ = (NI)0;
|
|
T4_ = monthday__pureZtimes_1245(dt);
|
|
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
|
|
colontmpD__2 = nsuIntToStr(((NI) (T4_)), ((NI)2));
|
|
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
|
|
prepareAdd((&(*result)), colontmpD__2.len + 0);
|
|
appendString((&(*result)), colontmpD__2);
|
|
eqdestroy___stdZassertions_13((&colontmpD__2));
|
|
}
|
|
break;
|
|
case ((tyEnum_FormatPattern__asapJ9b4qGHESR0g3CfbCjQ)2):
|
|
{
|
|
prepareAdd((&(*result)), (*loc).ddd[((*dt).weekday)- 0].len + 0);
|
|
appendString((&(*result)), (*loc).ddd[((*dt).weekday)- 0]);
|
|
}
|
|
break;
|
|
case ((tyEnum_FormatPattern__asapJ9b4qGHESR0g3CfbCjQ)3):
|
|
{
|
|
prepareAdd((&(*result)), (*loc).dddd[((*dt).weekday)- 0].len + 0);
|
|
appendString((&(*result)), (*loc).dddd[((*dt).weekday)- 0]);
|
|
}
|
|
break;
|
|
case ((tyEnum_FormatPattern__asapJ9b4qGHESR0g3CfbCjQ)4):
|
|
{
|
|
NimStringV2 colontmpD__3;
|
|
NimStringV2 colontmpD__4;
|
|
NimStringV2 colontmpD__5;
|
|
NimStringV2 T8_;
|
|
colontmpD__3.len = 0; colontmpD__3.p = NIM_NIL;
|
|
colontmpD__4.len = 0; colontmpD__4.p = NIM_NIL;
|
|
colontmpD__5.len = 0; colontmpD__5.p = NIM_NIL;
|
|
T8_.len = 0; T8_.p = NIM_NIL;
|
|
{
|
|
if (!(((NI) ((*dt).hour)) == ((NI)0))) goto LA11_;
|
|
colontmpD__3 = TM__6NbDwwj5FY059b1gz2AsAZQ_7;
|
|
T8_ = colontmpD__3;
|
|
}
|
|
goto LA9_;
|
|
LA11_: ;
|
|
{
|
|
if (!(((NI)12) < ((NI) ((*dt).hour)))) goto LA14_;
|
|
colontmpD__4 = dollar___systemZdollars_3((NI)(((NI) ((*dt).hour)) - ((NI)12)));
|
|
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
|
|
T8_ = colontmpD__4;
|
|
}
|
|
goto LA9_;
|
|
LA14_: ;
|
|
{
|
|
colontmpD__5 = dollar___systemZdollars_3(((NI) ((*dt).hour)));
|
|
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
|
|
T8_ = colontmpD__5;
|
|
}
|
|
LA9_: ;
|
|
prepareAdd((&(*result)), T8_.len + 0);
|
|
appendString((&(*result)), T8_);
|
|
eqdestroy___stdZassertions_13((&colontmpD__5));
|
|
eqdestroy___stdZassertions_13((&colontmpD__4));
|
|
eqdestroy___stdZassertions_13((&colontmpD__3));
|
|
}
|
|
break;
|
|
case ((tyEnum_FormatPattern__asapJ9b4qGHESR0g3CfbCjQ)5):
|
|
{
|
|
NimStringV2 colontmpD__6;
|
|
NimStringV2 colontmpD__7;
|
|
NimStringV2 colontmpD__8;
|
|
NimStringV2 T18_;
|
|
colontmpD__6.len = 0; colontmpD__6.p = NIM_NIL;
|
|
colontmpD__7.len = 0; colontmpD__7.p = NIM_NIL;
|
|
colontmpD__8.len = 0; colontmpD__8.p = NIM_NIL;
|
|
T18_.len = 0; T18_.p = NIM_NIL;
|
|
{
|
|
if (!(((NI) ((*dt).hour)) == ((NI)0))) goto LA21_;
|
|
colontmpD__6 = TM__6NbDwwj5FY059b1gz2AsAZQ_8;
|
|
T18_ = colontmpD__6;
|
|
}
|
|
goto LA19_;
|
|
LA21_: ;
|
|
{
|
|
if (!(((NI)12) < ((NI) ((*dt).hour)))) goto LA24_;
|
|
colontmpD__7 = nsuIntToStr((NI)(((NI) ((*dt).hour)) - ((NI)12)), ((NI)2));
|
|
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
|
|
T18_ = colontmpD__7;
|
|
}
|
|
goto LA19_;
|
|
LA24_: ;
|
|
{
|
|
colontmpD__8 = nsuIntToStr(((NI) ((*dt).hour)), ((NI)2));
|
|
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
|
|
T18_ = colontmpD__8;
|
|
}
|
|
LA19_: ;
|
|
prepareAdd((&(*result)), T18_.len + 0);
|
|
appendString((&(*result)), T18_);
|
|
eqdestroy___stdZassertions_13((&colontmpD__8));
|
|
eqdestroy___stdZassertions_13((&colontmpD__7));
|
|
eqdestroy___stdZassertions_13((&colontmpD__6));
|
|
}
|
|
break;
|
|
case ((tyEnum_FormatPattern__asapJ9b4qGHESR0g3CfbCjQ)6):
|
|
{
|
|
NimStringV2 colontmpD__9;
|
|
colontmpD__9.len = 0; colontmpD__9.p = NIM_NIL;
|
|
colontmpD__9 = dollar___systemZdollars_3(((NI) ((*dt).hour)));
|
|
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
|
|
prepareAdd((&(*result)), colontmpD__9.len + 0);
|
|
appendString((&(*result)), colontmpD__9);
|
|
eqdestroy___stdZassertions_13((&colontmpD__9));
|
|
}
|
|
break;
|
|
case ((tyEnum_FormatPattern__asapJ9b4qGHESR0g3CfbCjQ)7):
|
|
{
|
|
NimStringV2 colontmpD__10;
|
|
colontmpD__10.len = 0; colontmpD__10.p = NIM_NIL;
|
|
colontmpD__10 = nsuIntToStr(((NI) ((*dt).hour)), ((NI)2));
|
|
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
|
|
prepareAdd((&(*result)), colontmpD__10.len + 0);
|
|
appendString((&(*result)), colontmpD__10);
|
|
eqdestroy___stdZassertions_13((&colontmpD__10));
|
|
}
|
|
break;
|
|
case ((tyEnum_FormatPattern__asapJ9b4qGHESR0g3CfbCjQ)8):
|
|
{
|
|
NimStringV2 colontmpD__11;
|
|
colontmpD__11.len = 0; colontmpD__11.p = NIM_NIL;
|
|
colontmpD__11 = dollar___systemZdollars_3(((NI) ((*dt).minute)));
|
|
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
|
|
prepareAdd((&(*result)), colontmpD__11.len + 0);
|
|
appendString((&(*result)), colontmpD__11);
|
|
eqdestroy___stdZassertions_13((&colontmpD__11));
|
|
}
|
|
break;
|
|
case ((tyEnum_FormatPattern__asapJ9b4qGHESR0g3CfbCjQ)9):
|
|
{
|
|
NimStringV2 colontmpD__12;
|
|
colontmpD__12.len = 0; colontmpD__12.p = NIM_NIL;
|
|
colontmpD__12 = nsuIntToStr(((NI) ((*dt).minute)), ((NI)2));
|
|
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
|
|
prepareAdd((&(*result)), colontmpD__12.len + 0);
|
|
appendString((&(*result)), colontmpD__12);
|
|
eqdestroy___stdZassertions_13((&colontmpD__12));
|
|
}
|
|
break;
|
|
case ((tyEnum_FormatPattern__asapJ9b4qGHESR0g3CfbCjQ)10):
|
|
{
|
|
NimStringV2 colontmpD__13;
|
|
tyEnum_Month__JS0JuFvCBbC2GL3xXBnPQw T32_;
|
|
colontmpD__13.len = 0; colontmpD__13.p = NIM_NIL;
|
|
T32_ = (tyEnum_Month__JS0JuFvCBbC2GL3xXBnPQw)0;
|
|
T32_ = month__pureZtimes_1251(dt);
|
|
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
|
|
colontmpD__13 = dollar___systemZdollars_3(T32_);
|
|
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
|
|
prepareAdd((&(*result)), colontmpD__13.len + 0);
|
|
appendString((&(*result)), colontmpD__13);
|
|
eqdestroy___stdZassertions_13((&colontmpD__13));
|
|
}
|
|
break;
|
|
case ((tyEnum_FormatPattern__asapJ9b4qGHESR0g3CfbCjQ)11):
|
|
{
|
|
NimStringV2 colontmpD__14;
|
|
tyEnum_Month__JS0JuFvCBbC2GL3xXBnPQw T34_;
|
|
colontmpD__14.len = 0; colontmpD__14.p = NIM_NIL;
|
|
T34_ = (tyEnum_Month__JS0JuFvCBbC2GL3xXBnPQw)0;
|
|
T34_ = month__pureZtimes_1251(dt);
|
|
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
|
|
colontmpD__14 = nsuIntToStr(T34_, ((NI)2));
|
|
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
|
|
prepareAdd((&(*result)), colontmpD__14.len + 0);
|
|
appendString((&(*result)), colontmpD__14);
|
|
eqdestroy___stdZassertions_13((&colontmpD__14));
|
|
}
|
|
break;
|
|
case ((tyEnum_FormatPattern__asapJ9b4qGHESR0g3CfbCjQ)12):
|
|
{
|
|
tyEnum_Month__JS0JuFvCBbC2GL3xXBnPQw T36_;
|
|
T36_ = (tyEnum_Month__JS0JuFvCBbC2GL3xXBnPQw)0;
|
|
T36_ = month__pureZtimes_1251(dt);
|
|
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
|
|
prepareAdd((&(*result)), (*loc).MMM[(T36_)- 1].len + 0);
|
|
appendString((&(*result)), (*loc).MMM[(T36_)- 1]);
|
|
}
|
|
break;
|
|
case ((tyEnum_FormatPattern__asapJ9b4qGHESR0g3CfbCjQ)13):
|
|
{
|
|
tyEnum_Month__JS0JuFvCBbC2GL3xXBnPQw T38_;
|
|
T38_ = (tyEnum_Month__JS0JuFvCBbC2GL3xXBnPQw)0;
|
|
T38_ = month__pureZtimes_1251(dt);
|
|
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
|
|
prepareAdd((&(*result)), (*loc).MMMM[(T38_)- 1].len + 0);
|
|
appendString((&(*result)), (*loc).MMMM[(T38_)- 1]);
|
|
}
|
|
break;
|
|
case ((tyEnum_FormatPattern__asapJ9b4qGHESR0g3CfbCjQ)14):
|
|
{
|
|
NimStringV2 colontmpD__15;
|
|
colontmpD__15.len = 0; colontmpD__15.p = NIM_NIL;
|
|
colontmpD__15 = dollar___systemZdollars_3(((NI) ((*dt).second)));
|
|
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
|
|
prepareAdd((&(*result)), colontmpD__15.len + 0);
|
|
appendString((&(*result)), colontmpD__15);
|
|
eqdestroy___stdZassertions_13((&colontmpD__15));
|
|
}
|
|
break;
|
|
case ((tyEnum_FormatPattern__asapJ9b4qGHESR0g3CfbCjQ)15):
|
|
{
|
|
NimStringV2 colontmpD__16;
|
|
colontmpD__16.len = 0; colontmpD__16.p = NIM_NIL;
|
|
colontmpD__16 = nsuIntToStr(((NI) ((*dt).second)), ((NI)2));
|
|
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
|
|
prepareAdd((&(*result)), colontmpD__16.len + 0);
|
|
appendString((&(*result)), colontmpD__16);
|
|
eqdestroy___stdZassertions_13((&colontmpD__16));
|
|
}
|
|
break;
|
|
case ((tyEnum_FormatPattern__asapJ9b4qGHESR0g3CfbCjQ)16):
|
|
{
|
|
NimStringV2 colontmpD__17;
|
|
NI T42_;
|
|
colontmpD__17.len = 0; colontmpD__17.p = NIM_NIL;
|
|
T42_ = (NI)0;
|
|
T42_ = convert__pureZtimes_751(((tyEnum_TimeUnit__52alPn04ElUUbqLeok9b3PQ)0), ((tyEnum_TimeUnit__52alPn04ElUUbqLeok9b3PQ)2), (*dt).nanosecond);
|
|
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
|
|
colontmpD__17 = nsuIntToStr(((NI) (T42_)), ((NI)3));
|
|
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
|
|
prepareAdd((&(*result)), colontmpD__17.len + 0);
|
|
appendString((&(*result)), colontmpD__17);
|
|
eqdestroy___stdZassertions_13((&colontmpD__17));
|
|
}
|
|
break;
|
|
case ((tyEnum_FormatPattern__asapJ9b4qGHESR0g3CfbCjQ)17):
|
|
{
|
|
NimStringV2 colontmpD__18;
|
|
NI T44_;
|
|
colontmpD__18.len = 0; colontmpD__18.p = NIM_NIL;
|
|
T44_ = (NI)0;
|
|
T44_ = convert__pureZtimes_751(((tyEnum_TimeUnit__52alPn04ElUUbqLeok9b3PQ)0), ((tyEnum_TimeUnit__52alPn04ElUUbqLeok9b3PQ)1), (*dt).nanosecond);
|
|
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
|
|
colontmpD__18 = nsuIntToStr(((NI) (T44_)), ((NI)6));
|
|
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
|
|
prepareAdd((&(*result)), colontmpD__18.len + 0);
|
|
appendString((&(*result)), colontmpD__18);
|
|
eqdestroy___stdZassertions_13((&colontmpD__18));
|
|
}
|
|
break;
|
|
case ((tyEnum_FormatPattern__asapJ9b4qGHESR0g3CfbCjQ)18):
|
|
{
|
|
NimStringV2 colontmpD__19;
|
|
colontmpD__19.len = 0; colontmpD__19.p = NIM_NIL;
|
|
colontmpD__19 = nsuIntToStr(((NI) ((*dt).nanosecond)), ((NI)9));
|
|
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
|
|
prepareAdd((&(*result)), colontmpD__19.len + 0);
|
|
appendString((&(*result)), colontmpD__19);
|
|
eqdestroy___stdZassertions_13((&colontmpD__19));
|
|
}
|
|
break;
|
|
case ((tyEnum_FormatPattern__asapJ9b4qGHESR0g3CfbCjQ)19):
|
|
{
|
|
NimStringV2 colontmpD__20;
|
|
NimStringV2 colontmpD__21;
|
|
NimStringV2 T47_;
|
|
colontmpD__20.len = 0; colontmpD__20.p = NIM_NIL;
|
|
colontmpD__21.len = 0; colontmpD__21.p = NIM_NIL;
|
|
T47_.len = 0; T47_.p = NIM_NIL;
|
|
{
|
|
if (!(((NI)12) <= ((NI) ((*dt).hour)))) goto LA50_;
|
|
colontmpD__20 = TM__6NbDwwj5FY059b1gz2AsAZQ_10;
|
|
T47_ = colontmpD__20;
|
|
}
|
|
goto LA48_;
|
|
LA50_: ;
|
|
{
|
|
colontmpD__21 = TM__6NbDwwj5FY059b1gz2AsAZQ_12;
|
|
T47_ = colontmpD__21;
|
|
}
|
|
LA48_: ;
|
|
prepareAdd((&(*result)), T47_.len + 0);
|
|
appendString((&(*result)), T47_);
|
|
eqdestroy___stdZassertions_13((&colontmpD__21));
|
|
eqdestroy___stdZassertions_13((&colontmpD__20));
|
|
}
|
|
break;
|
|
case ((tyEnum_FormatPattern__asapJ9b4qGHESR0g3CfbCjQ)20):
|
|
{
|
|
NimStringV2 colontmpD__22;
|
|
NimStringV2 colontmpD__23;
|
|
NimStringV2 T54_;
|
|
colontmpD__22.len = 0; colontmpD__22.p = NIM_NIL;
|
|
colontmpD__23.len = 0; colontmpD__23.p = NIM_NIL;
|
|
T54_.len = 0; T54_.p = NIM_NIL;
|
|
{
|
|
if (!(((NI)12) <= ((NI) ((*dt).hour)))) goto LA57_;
|
|
colontmpD__22 = TM__6NbDwwj5FY059b1gz2AsAZQ_14;
|
|
T54_ = colontmpD__22;
|
|
}
|
|
goto LA55_;
|
|
LA57_: ;
|
|
{
|
|
colontmpD__23 = TM__6NbDwwj5FY059b1gz2AsAZQ_16;
|
|
T54_ = colontmpD__23;
|
|
}
|
|
LA55_: ;
|
|
prepareAdd((&(*result)), T54_.len + 0);
|
|
appendString((&(*result)), T54_);
|
|
eqdestroy___stdZassertions_13((&colontmpD__23));
|
|
eqdestroy___stdZassertions_13((&colontmpD__22));
|
|
}
|
|
break;
|
|
case ((tyEnum_FormatPattern__asapJ9b4qGHESR0g3CfbCjQ)21):
|
|
{
|
|
NI colontmpD__24;
|
|
NI colontmpD__25;
|
|
NimStringV2 colontmpD__26;
|
|
NI T61_;
|
|
colontmpD__24 = (NI)0;
|
|
colontmpD__25 = (NI)0;
|
|
colontmpD__26.len = 0; colontmpD__26.p = NIM_NIL;
|
|
T61_ = (NI)0;
|
|
{
|
|
if (!((*dt).year <= ((NI)0))) goto LA64_;
|
|
colontmpD__24 = (NI)(((*dt).year > 0? ((*dt).year) : -((*dt).year)) + ((NI)1));
|
|
T61_ = colontmpD__24;
|
|
}
|
|
goto LA62_;
|
|
LA64_: ;
|
|
{
|
|
colontmpD__25 = (*dt).year;
|
|
T61_ = colontmpD__25;
|
|
}
|
|
LA62_: ;
|
|
colontmpD__26 = nsuIntToStr((NI)(T61_ % ((NI)100)), ((NI)2));
|
|
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
|
|
prepareAdd((&(*result)), colontmpD__26.len + 0);
|
|
appendString((&(*result)), colontmpD__26);
|
|
eqdestroy___stdZassertions_13((&colontmpD__26));
|
|
}
|
|
break;
|
|
case ((tyEnum_FormatPattern__asapJ9b4qGHESR0g3CfbCjQ)22):
|
|
{
|
|
NI colontmpD__27;
|
|
NI colontmpD__28;
|
|
NI year;
|
|
colontmpD__27 = (NI)0;
|
|
colontmpD__28 = (NI)0;
|
|
{
|
|
if (!((*dt).year <= ((NI)0))) goto LA70_;
|
|
colontmpD__27 = (NI)(((*dt).year > 0? ((*dt).year) : -((*dt).year)) + ((NI)1));
|
|
year = colontmpD__27;
|
|
}
|
|
goto LA68_;
|
|
LA70_: ;
|
|
{
|
|
colontmpD__28 = (*dt).year;
|
|
year = colontmpD__28;
|
|
}
|
|
LA68_: ;
|
|
{
|
|
NimStringV2 colontmpD__29;
|
|
if (!(year < ((NI)10000))) goto LA75_;
|
|
colontmpD__29.len = 0; colontmpD__29.p = NIM_NIL;
|
|
colontmpD__29 = nsuIntToStr(year, ((NI)4));
|
|
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
|
|
prepareAdd((&(*result)), colontmpD__29.len + 0);
|
|
appendString((&(*result)), colontmpD__29);
|
|
eqdestroy___stdZassertions_13((&colontmpD__29));
|
|
}
|
|
goto LA73_;
|
|
LA75_: ;
|
|
{
|
|
NimStringV2 colontmpD__30;
|
|
NimStringV2 colontmpD__31;
|
|
NimStringV2 T78_;
|
|
colontmpD__30.len = 0; colontmpD__30.p = NIM_NIL;
|
|
colontmpD__31.len = 0; colontmpD__31.p = NIM_NIL;
|
|
T78_.len = 0; T78_.p = NIM_NIL;
|
|
colontmpD__30 = dollar___systemZdollars_3(year);
|
|
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
|
|
T78_ = rawNewString(colontmpD__30.len + 1);
|
|
appendChar((&T78_), 43);
|
|
appendString((&T78_), colontmpD__30);
|
|
colontmpD__31 = T78_;
|
|
prepareAdd((&(*result)), colontmpD__31.len + 0);
|
|
appendString((&(*result)), colontmpD__31);
|
|
eqdestroy___stdZassertions_13((&colontmpD__31));
|
|
eqdestroy___stdZassertions_13((&colontmpD__30));
|
|
}
|
|
LA73_: ;
|
|
}
|
|
break;
|
|
case ((tyEnum_FormatPattern__asapJ9b4qGHESR0g3CfbCjQ)23):
|
|
{
|
|
{
|
|
NimStringV2 colontmpD__32;
|
|
if (!((*dt).year < ((NI)1))) goto LA82_;
|
|
colontmpD__32.len = 0; colontmpD__32.p = NIM_NIL;
|
|
colontmpD__32 = dollar___systemZdollars_3((NI)(((*dt).year > 0? ((*dt).year) : -((*dt).year)) + ((NI)1)));
|
|
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
|
|
prepareAdd((&(*result)), colontmpD__32.len + 0);
|
|
appendString((&(*result)), colontmpD__32);
|
|
eqdestroy___stdZassertions_13((&colontmpD__32));
|
|
}
|
|
goto LA80_;
|
|
LA82_: ;
|
|
{
|
|
NimStringV2 colontmpD__33;
|
|
colontmpD__33.len = 0; colontmpD__33.p = NIM_NIL;
|
|
colontmpD__33 = dollar___systemZdollars_3((*dt).year);
|
|
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
|
|
prepareAdd((&(*result)), colontmpD__33.len + 0);
|
|
appendString((&(*result)), colontmpD__33);
|
|
eqdestroy___stdZassertions_13((&colontmpD__33));
|
|
}
|
|
LA80_: ;
|
|
}
|
|
break;
|
|
case ((tyEnum_FormatPattern__asapJ9b4qGHESR0g3CfbCjQ)24):
|
|
{
|
|
NI year_2;
|
|
year_2 = (*dt).year;
|
|
{
|
|
NIM_BOOL T88_;
|
|
NimStringV2 colontmpD__34;
|
|
T88_ = (NIM_BOOL)0;
|
|
T88_ = (year_2 < ((NI)10000));
|
|
if (T88_) goto LA89_;
|
|
T88_ = (year_2 < ((NI)0));
|
|
LA89_: ;
|
|
if (!T88_) goto LA90_;
|
|
colontmpD__34.len = 0; colontmpD__34.p = NIM_NIL;
|
|
colontmpD__34 = nsuIntToStr(year_2, ((NI)4));
|
|
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
|
|
prepareAdd((&(*result)), colontmpD__34.len + 0);
|
|
appendString((&(*result)), colontmpD__34);
|
|
eqdestroy___stdZassertions_13((&colontmpD__34));
|
|
}
|
|
goto LA86_;
|
|
LA90_: ;
|
|
{
|
|
NimStringV2 colontmpD__35;
|
|
NimStringV2 colontmpD__36;
|
|
NimStringV2 T93_;
|
|
colontmpD__35.len = 0; colontmpD__35.p = NIM_NIL;
|
|
colontmpD__36.len = 0; colontmpD__36.p = NIM_NIL;
|
|
T93_.len = 0; T93_.p = NIM_NIL;
|
|
colontmpD__35 = dollar___systemZdollars_3(year_2);
|
|
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
|
|
T93_ = rawNewString(colontmpD__35.len + 1);
|
|
appendChar((&T93_), 43);
|
|
appendString((&T93_), colontmpD__35);
|
|
colontmpD__36 = T93_;
|
|
prepareAdd((&(*result)), colontmpD__36.len + 0);
|
|
appendString((&(*result)), colontmpD__36);
|
|
eqdestroy___stdZassertions_13((&colontmpD__36));
|
|
eqdestroy___stdZassertions_13((&colontmpD__35));
|
|
}
|
|
LA86_: ;
|
|
}
|
|
break;
|
|
case ((tyEnum_FormatPattern__asapJ9b4qGHESR0g3CfbCjQ)25):
|
|
{
|
|
NimStringV2 colontmpD__37;
|
|
colontmpD__37.len = 0; colontmpD__37.p = NIM_NIL;
|
|
colontmpD__37 = dollar___systemZdollars_3((*dt).year);
|
|
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
|
|
prepareAdd((&(*result)), colontmpD__37.len + 0);
|
|
appendString((&(*result)), colontmpD__37);
|
|
eqdestroy___stdZassertions_13((&colontmpD__37));
|
|
}
|
|
break;
|
|
case ((tyEnum_FormatPattern__asapJ9b4qGHESR0g3CfbCjQ)26):
|
|
case ((tyEnum_FormatPattern__asapJ9b4qGHESR0g3CfbCjQ)27):
|
|
case ((tyEnum_FormatPattern__asapJ9b4qGHESR0g3CfbCjQ)28):
|
|
case ((tyEnum_FormatPattern__asapJ9b4qGHESR0g3CfbCjQ)29):
|
|
case ((tyEnum_FormatPattern__asapJ9b4qGHESR0g3CfbCjQ)30):
|
|
case ((tyEnum_FormatPattern__asapJ9b4qGHESR0g3CfbCjQ)31):
|
|
{
|
|
{
|
|
NIM_BOOL T98_;
|
|
NIM_BOOL T99_;
|
|
T98_ = (NIM_BOOL)0;
|
|
T99_ = (NIM_BOOL)0;
|
|
T99_ = eqeq___pureZtimes_1500((*dt).timezone, ((tyObject_TimezonecolonObjectType___F8OvqlxXyGXRSiK9c1fCDVw*) NIM_NIL));
|
|
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
|
|
T98_ = !(T99_);
|
|
if (!(T98_)) goto LA100_;
|
|
T98_ = eqStrings((*(*dt).timezone).name, TM__6NbDwwj5FY059b1gz2AsAZQ_18);
|
|
LA100_: ;
|
|
if (!T98_) goto LA101_;
|
|
nimAddCharV1((&(*result)), 90);
|
|
}
|
|
goto LA96_;
|
|
LA101_: ;
|
|
{
|
|
NIM_CHAR colontmpD__38;
|
|
NIM_CHAR colontmpD__39;
|
|
NIM_CHAR T104_;
|
|
NI absOffset;
|
|
colontmpD__38 = (NIM_CHAR)0;
|
|
colontmpD__39 = (NIM_CHAR)0;
|
|
T104_ = (NIM_CHAR)0;
|
|
{
|
|
if (!(((NI)0) <= ((NI64)-((*dt).utcOffset)))) goto LA107_;
|
|
colontmpD__38 = 43;
|
|
T104_ = colontmpD__38;
|
|
}
|
|
goto LA105_;
|
|
LA107_: ;
|
|
{
|
|
colontmpD__39 = 45;
|
|
T104_ = colontmpD__39;
|
|
}
|
|
LA105_: ;
|
|
nimAddCharV1((&(*result)), T104_);
|
|
absOffset = ((*dt).utcOffset > 0? ((*dt).utcOffset) : -((*dt).utcOffset));
|
|
switch (pattern) {
|
|
case ((tyEnum_FormatPattern__asapJ9b4qGHESR0g3CfbCjQ)26):
|
|
{
|
|
NimStringV2 colontmpD__40;
|
|
colontmpD__40.len = 0; colontmpD__40.p = NIM_NIL;
|
|
colontmpD__40 = dollar___systemZdollars_3((NI)(absOffset / ((NI)3600)));
|
|
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
|
|
prepareAdd((&(*result)), colontmpD__40.len + 0);
|
|
appendString((&(*result)), colontmpD__40);
|
|
eqdestroy___stdZassertions_13((&colontmpD__40));
|
|
}
|
|
break;
|
|
case ((tyEnum_FormatPattern__asapJ9b4qGHESR0g3CfbCjQ)27):
|
|
{
|
|
NimStringV2 colontmpD__41;
|
|
colontmpD__41.len = 0; colontmpD__41.p = NIM_NIL;
|
|
colontmpD__41 = nsuIntToStr((NI)(absOffset / ((NI)3600)), ((NI)2));
|
|
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
|
|
prepareAdd((&(*result)), colontmpD__41.len + 0);
|
|
appendString((&(*result)), colontmpD__41);
|
|
eqdestroy___stdZassertions_13((&colontmpD__41));
|
|
}
|
|
break;
|
|
case ((tyEnum_FormatPattern__asapJ9b4qGHESR0g3CfbCjQ)28):
|
|
case ((tyEnum_FormatPattern__asapJ9b4qGHESR0g3CfbCjQ)30):
|
|
{
|
|
NimStringV2 h;
|
|
NimStringV2 m;
|
|
NimStringV2 sep;
|
|
NimStringV2 colontmpD__42;
|
|
NimStringV2 T113_;
|
|
NimStringV2 T119_;
|
|
h.len = 0; h.p = NIM_NIL;
|
|
m.len = 0; m.p = NIM_NIL;
|
|
sep.len = 0; sep.p = NIM_NIL;
|
|
colontmpD__42.len = 0; colontmpD__42.p = NIM_NIL;
|
|
h = nsuIntToStr((NI)(absOffset / ((NI)3600)), ((NI)2));
|
|
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
|
|
m = nsuIntToStr((NI)((NI)(absOffset / ((NI)60)) % ((NI)60)), ((NI)2));
|
|
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
|
|
T113_.len = 0; T113_.p = NIM_NIL;
|
|
{
|
|
if (!(pattern == ((tyEnum_FormatPattern__asapJ9b4qGHESR0g3CfbCjQ)28))) goto LA116_;
|
|
sep = TM__6NbDwwj5FY059b1gz2AsAZQ_20;
|
|
}
|
|
goto LA114_;
|
|
LA116_: ;
|
|
{
|
|
sep = TM__6NbDwwj5FY059b1gz2AsAZQ_21;
|
|
}
|
|
LA114_: ;
|
|
T119_.len = 0; T119_.p = NIM_NIL;
|
|
T119_ = rawNewString(h.len + sep.len + m.len + 0);
|
|
appendString((&T119_), h);
|
|
appendString((&T119_), sep);
|
|
appendString((&T119_), m);
|
|
colontmpD__42 = T119_;
|
|
prepareAdd((&(*result)), colontmpD__42.len + 0);
|
|
appendString((&(*result)), colontmpD__42);
|
|
eqdestroy___stdZassertions_13((&colontmpD__42));
|
|
eqdestroy___stdZassertions_13((&m));
|
|
eqdestroy___stdZassertions_13((&h));
|
|
}
|
|
break;
|
|
case ((tyEnum_FormatPattern__asapJ9b4qGHESR0g3CfbCjQ)29):
|
|
case ((tyEnum_FormatPattern__asapJ9b4qGHESR0g3CfbCjQ)31):
|
|
{
|
|
NimStringV2 h_2;
|
|
NimStringV2 m_2;
|
|
NimStringV2 s;
|
|
NimStringV2 sep_2;
|
|
NimStringV2 colontmpD__43;
|
|
NI absOffset_2;
|
|
NimStringV2 T121_;
|
|
NimStringV2 T127_;
|
|
h_2.len = 0; h_2.p = NIM_NIL;
|
|
m_2.len = 0; m_2.p = NIM_NIL;
|
|
s.len = 0; s.p = NIM_NIL;
|
|
sep_2.len = 0; sep_2.p = NIM_NIL;
|
|
colontmpD__43.len = 0; colontmpD__43.p = NIM_NIL;
|
|
absOffset_2 = ((*dt).utcOffset > 0? ((*dt).utcOffset) : -((*dt).utcOffset));
|
|
h_2 = nsuIntToStr((NI)(absOffset_2 / ((NI)3600)), ((NI)2));
|
|
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
|
|
m_2 = nsuIntToStr((NI)((NI)(absOffset_2 / ((NI)60)) % ((NI)60)), ((NI)2));
|
|
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
|
|
s = nsuIntToStr((NI)(absOffset_2 % ((NI)60)), ((NI)2));
|
|
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
|
|
T121_.len = 0; T121_.p = NIM_NIL;
|
|
{
|
|
if (!(pattern == ((tyEnum_FormatPattern__asapJ9b4qGHESR0g3CfbCjQ)29))) goto LA124_;
|
|
sep_2 = TM__6NbDwwj5FY059b1gz2AsAZQ_22;
|
|
}
|
|
goto LA122_;
|
|
LA124_: ;
|
|
{
|
|
sep_2 = TM__6NbDwwj5FY059b1gz2AsAZQ_23;
|
|
}
|
|
LA122_: ;
|
|
T127_.len = 0; T127_.p = NIM_NIL;
|
|
T127_ = rawNewString(h_2.len + sep_2.len + m_2.len + sep_2.len + s.len + 0);
|
|
appendString((&T127_), h_2);
|
|
appendString((&T127_), sep_2);
|
|
appendString((&T127_), m_2);
|
|
appendString((&T127_), sep_2);
|
|
appendString((&T127_), s);
|
|
colontmpD__43 = T127_;
|
|
prepareAdd((&(*result)), colontmpD__43.len + 0);
|
|
appendString((&(*result)), colontmpD__43);
|
|
eqdestroy___stdZassertions_13((&colontmpD__43));
|
|
eqdestroy___stdZassertions_13((&s));
|
|
eqdestroy___stdZassertions_13((&m_2));
|
|
eqdestroy___stdZassertions_13((&h_2));
|
|
}
|
|
break;
|
|
default:
|
|
{
|
|
}
|
|
break;
|
|
}
|
|
}
|
|
LA96_: ;
|
|
}
|
|
break;
|
|
case ((tyEnum_FormatPattern__asapJ9b4qGHESR0g3CfbCjQ)32):
|
|
{
|
|
NimStringV2 colontmpD__44;
|
|
NimStringV2 colontmpD__45;
|
|
NimStringV2 T130_;
|
|
colontmpD__44.len = 0; colontmpD__44.p = NIM_NIL;
|
|
colontmpD__45.len = 0; colontmpD__45.p = NIM_NIL;
|
|
T130_.len = 0; T130_.p = NIM_NIL;
|
|
{
|
|
if (!((*dt).year < ((NI)1))) goto LA133_;
|
|
colontmpD__44 = TM__6NbDwwj5FY059b1gz2AsAZQ_25;
|
|
T130_ = colontmpD__44;
|
|
}
|
|
goto LA131_;
|
|
LA133_: ;
|
|
{
|
|
colontmpD__45 = TM__6NbDwwj5FY059b1gz2AsAZQ_27;
|
|
T130_ = colontmpD__45;
|
|
}
|
|
LA131_: ;
|
|
prepareAdd((&(*result)), T130_.len + 0);
|
|
appendString((&(*result)), T130_);
|
|
eqdestroy___stdZassertions_13((&colontmpD__45));
|
|
eqdestroy___stdZassertions_13((&colontmpD__44));
|
|
}
|
|
break;
|
|
case ((tyEnum_FormatPattern__asapJ9b4qGHESR0g3CfbCjQ)33):
|
|
{
|
|
}
|
|
break;
|
|
}
|
|
}BeforeRet_: ;
|
|
}
|
|
N_LIB_PRIVATE N_NIMCALL(NimStringV2, format__pureZtimes_3590)(tyObject_DateTime__d9cK9cyKZPJJxFXUmx8dSpPw* dt, tyObject_TimeFormat__Nsh4TB3AD6ERMz3D74BTxA* f, tyObject_DateTimeLocale__uNv3Dc4hHpAREXnLVqGWZQ* loc) {
|
|
NimStringV2 result;
|
|
NI idx;
|
|
NIM_BOOL* nimErr_;
|
|
{nimErr_ = nimErrorFlag();
|
|
result.len = 0; result.p = NIM_NIL;
|
|
result = TM__6NbDwwj5FY059b1gz2AsAZQ_5;
|
|
idx = ((NI)0);
|
|
{
|
|
while (1) {
|
|
NI T3_;
|
|
T3_ = ((*f).patterns.len-1);
|
|
if (!(idx <= T3_)) goto LA2 ;
|
|
switch (((tyEnum_FormatPattern__asapJ9b4qGHESR0g3CfbCjQ) ((*f).patterns.p->data[idx]))) {
|
|
case ((tyEnum_FormatPattern__asapJ9b4qGHESR0g3CfbCjQ)33):
|
|
{
|
|
NU8 len;
|
|
idx += ((NI)1);
|
|
len = (*f).patterns.p->data[idx];
|
|
{
|
|
NU8 i;
|
|
NI res;
|
|
i = (NU8)0;
|
|
res = ((NI)1);
|
|
{
|
|
while (1) {
|
|
if (!(res <= ((NI) (len)))) goto LA7 ;
|
|
i = ((NU8) (res));
|
|
idx += ((NI)1);
|
|
nimAddCharV1((&result), ((NIM_CHAR) ((*f).patterns.p->data[idx])));
|
|
res += ((NI)1);
|
|
} LA7: ;
|
|
}
|
|
}
|
|
idx += ((NI)1);
|
|
}
|
|
break;
|
|
default:
|
|
{
|
|
formatPattern__pureZtimes_2365(dt, ((tyEnum_FormatPattern__asapJ9b4qGHESR0g3CfbCjQ) ((*f).patterns.p->data[idx])), (&result), loc);
|
|
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
|
|
idx += ((NI)1);
|
|
}
|
|
break;
|
|
}
|
|
} LA2: ;
|
|
}
|
|
}BeforeRet_: ;
|
|
return result;
|
|
}
|
|
N_LIB_PRIVATE N_NIMCALL(NimStringV2, format__options_604)(tyObject_DateTime__d9cK9cyKZPJJxFXUmx8dSpPw* dt) {
|
|
NimStringV2 result;
|
|
NIM_BOOL* nimErr_;
|
|
{nimErr_ = nimErrorFlag();
|
|
result.len = 0; result.p = NIM_NIL;
|
|
result = format__pureZtimes_3590(dt, (&f2__options_609), (&DefaultLocale__pureZtimes_1852));
|
|
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
|
|
}BeforeRet_: ;
|
|
return result;
|
|
}
|
|
static N_INLINE(NI64, convert__pureZtimes_486)(tyEnum_TimeUnit__52alPn04ElUUbqLeok9b3PQ unitFrom, tyEnum_TimeUnit__52alPn04ElUUbqLeok9b3PQ unitTo, NI64 quantity) {
|
|
NI64 result;
|
|
NI64 colontmpD_;
|
|
NI64 colontmpD__2;
|
|
result = (NI64)0;
|
|
colontmpD_ = (NI64)0;
|
|
colontmpD__2 = (NI64)0;
|
|
{
|
|
if (!(unitFrom < unitTo)) goto LA3_;
|
|
colontmpD_ = (NI64)(quantity / (NI64)(unitWeights__pureZtimes_112[(unitTo)- 0] / unitWeights__pureZtimes_112[(unitFrom)- 0]));
|
|
result = colontmpD_;
|
|
}
|
|
goto LA1_;
|
|
LA3_: ;
|
|
{
|
|
colontmpD__2 = (NI64)((NI64)(unitWeights__pureZtimes_112[(unitFrom)- 0] / unitWeights__pureZtimes_112[(unitTo)- 0]) * quantity);
|
|
result = colontmpD__2;
|
|
}
|
|
LA1_: ;
|
|
return result;
|
|
}
|
|
static N_INLINE(NI, convert__pureZtimes_553)(tyEnum_TimeUnit__52alPn04ElUUbqLeok9b3PQ unitFrom, tyEnum_TimeUnit__52alPn04ElUUbqLeok9b3PQ unitTo, NI quantity) {
|
|
NI result;
|
|
NI colontmpD_;
|
|
NI colontmpD__2;
|
|
result = (NI)0;
|
|
colontmpD_ = (NI)0;
|
|
colontmpD__2 = (NI)0;
|
|
{
|
|
if (!(unitFrom < unitTo)) goto LA3_;
|
|
colontmpD_ = ((NI) ((NI64)(((NI64) (quantity)) / (NI64)(unitWeights__pureZtimes_112[(unitTo)- 0] / unitWeights__pureZtimes_112[(unitFrom)- 0]))));
|
|
result = colontmpD_;
|
|
}
|
|
goto LA1_;
|
|
LA3_: ;
|
|
{
|
|
colontmpD__2 = ((NI) ((NI64)((NI64)(unitWeights__pureZtimes_112[(unitFrom)- 0] / unitWeights__pureZtimes_112[(unitTo)- 0]) * ((NI64) (quantity)))));
|
|
result = colontmpD__2;
|
|
}
|
|
LA1_: ;
|
|
return result;
|
|
}
|
|
N_LIB_PRIVATE N_NIMCALL(tyObject_Time__3y2ZpqsTJLqdZvpC9a0rU2Q, normalize__pureZtimes_1123)(NI64 seconds, NI64 nanoseconds) {
|
|
tyObject_Time__3y2ZpqsTJLqdZvpC9a0rU2Q result;
|
|
NI64 T1_;
|
|
NI64 nanosecond;
|
|
NI T2_;
|
|
NIM_BOOL* nimErr_;
|
|
{nimErr_ = nimErrorFlag();
|
|
nimZeroMem((void*)(&result), sizeof(tyObject_Time__3y2ZpqsTJLqdZvpC9a0rU2Q));
|
|
T1_ = (NI64)0;
|
|
T1_ = convert__pureZtimes_486(((tyEnum_TimeUnit__52alPn04ElUUbqLeok9b3PQ)0), ((tyEnum_TimeUnit__52alPn04ElUUbqLeok9b3PQ)3), nanoseconds);
|
|
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
|
|
result.seconds = (NI64)(seconds + T1_);
|
|
T2_ = (NI)0;
|
|
T2_ = convert__pureZtimes_553(((tyEnum_TimeUnit__52alPn04ElUUbqLeok9b3PQ)3), ((tyEnum_TimeUnit__52alPn04ElUUbqLeok9b3PQ)0), ((NI)1));
|
|
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
|
|
nanosecond = (NI64)(nanoseconds % ((NI64) (T2_)));
|
|
{
|
|
NI T7_;
|
|
if (!(nanosecond < IL64(0))) goto LA5_;
|
|
T7_ = (NI)0;
|
|
T7_ = convert__pureZtimes_553(((tyEnum_TimeUnit__52alPn04ElUUbqLeok9b3PQ)3), ((tyEnum_TimeUnit__52alPn04ElUUbqLeok9b3PQ)0), ((NI)1));
|
|
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
|
|
nanosecond += ((NI64) (T7_));
|
|
result.seconds -= ((NI)1);
|
|
}
|
|
LA5_: ;
|
|
result.nanosecond = ((NI) (((NI) (nanosecond))));
|
|
}BeforeRet_: ;
|
|
return result;
|
|
}
|
|
N_LIB_PRIVATE N_NIMCALL(tyObject_Time__3y2ZpqsTJLqdZvpC9a0rU2Q, ntSubTime)(tyObject_Time__3y2ZpqsTJLqdZvpC9a0rU2Q a, tyObject_Duration__lj9ar6Co3fgk6NgGnVaNpJw b) {
|
|
tyObject_Time__3y2ZpqsTJLqdZvpC9a0rU2Q result;
|
|
NIM_BOOL* nimErr_;
|
|
{nimErr_ = nimErrorFlag();
|
|
nimZeroMem((void*)(&result), sizeof(tyObject_Time__3y2ZpqsTJLqdZvpC9a0rU2Q));
|
|
result = normalize__pureZtimes_1123((NI64)(a.seconds - b.seconds), ((NI64) ((NI)(((NI) (a.nanosecond)) - ((NI) (b.nanosecond))))));
|
|
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
|
|
}BeforeRet_: ;
|
|
return result;
|
|
}
|
|
N_LIB_PRIVATE N_NIMCALL(tyObject_Duration__lj9ar6Co3fgk6NgGnVaNpJw, normalize__pureZtimes_543)(NI64 seconds, NI64 nanoseconds) {
|
|
tyObject_Duration__lj9ar6Co3fgk6NgGnVaNpJw result;
|
|
NI64 T1_;
|
|
NI64 nanosecond;
|
|
NI T2_;
|
|
NIM_BOOL* nimErr_;
|
|
{nimErr_ = nimErrorFlag();
|
|
nimZeroMem((void*)(&result), sizeof(tyObject_Duration__lj9ar6Co3fgk6NgGnVaNpJw));
|
|
T1_ = (NI64)0;
|
|
T1_ = convert__pureZtimes_486(((tyEnum_TimeUnit__52alPn04ElUUbqLeok9b3PQ)0), ((tyEnum_TimeUnit__52alPn04ElUUbqLeok9b3PQ)3), nanoseconds);
|
|
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
|
|
result.seconds = (NI64)(seconds + T1_);
|
|
T2_ = (NI)0;
|
|
T2_ = convert__pureZtimes_553(((tyEnum_TimeUnit__52alPn04ElUUbqLeok9b3PQ)3), ((tyEnum_TimeUnit__52alPn04ElUUbqLeok9b3PQ)0), ((NI)1));
|
|
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
|
|
nanosecond = (NI64)(nanoseconds % ((NI64) (T2_)));
|
|
{
|
|
NI T7_;
|
|
if (!(nanosecond < IL64(0))) goto LA5_;
|
|
T7_ = (NI)0;
|
|
T7_ = convert__pureZtimes_553(((tyEnum_TimeUnit__52alPn04ElUUbqLeok9b3PQ)3), ((tyEnum_TimeUnit__52alPn04ElUUbqLeok9b3PQ)0), ((NI)1));
|
|
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
|
|
nanosecond += ((NI64) (T7_));
|
|
result.seconds -= ((NI)1);
|
|
}
|
|
LA5_: ;
|
|
result.nanosecond = ((NI) (((NI) (nanosecond))));
|
|
}BeforeRet_: ;
|
|
return result;
|
|
}
|
|
N_LIB_PRIVATE N_NIMCALL(tyObject_Duration__lj9ar6Co3fgk6NgGnVaNpJw, initDuration__pureZtimes_476)(NI64 nanoseconds, NI64 microseconds, NI64 milliseconds, NI64 seconds, NI64 minutes, NI64 hours, NI64 days, NI64 weeks) {
|
|
tyObject_Duration__lj9ar6Co3fgk6NgGnVaNpJw result;
|
|
NI64 seconds_2;
|
|
NI64 T1_;
|
|
NI64 T2_;
|
|
NI64 T3_;
|
|
NI64 T4_;
|
|
NI64 T5_;
|
|
NI64 T6_;
|
|
NI64 T7_;
|
|
NI64 T8_;
|
|
NI nanoseconds_2;
|
|
NI64 T9_;
|
|
NI64 T10_;
|
|
NIM_BOOL* nimErr_;
|
|
{nimErr_ = nimErrorFlag();
|
|
nimZeroMem((void*)(&result), sizeof(tyObject_Duration__lj9ar6Co3fgk6NgGnVaNpJw));
|
|
T1_ = (NI64)0;
|
|
T1_ = convert__pureZtimes_486(((tyEnum_TimeUnit__52alPn04ElUUbqLeok9b3PQ)7), ((tyEnum_TimeUnit__52alPn04ElUUbqLeok9b3PQ)3), weeks);
|
|
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
|
|
T2_ = (NI64)0;
|
|
T2_ = convert__pureZtimes_486(((tyEnum_TimeUnit__52alPn04ElUUbqLeok9b3PQ)6), ((tyEnum_TimeUnit__52alPn04ElUUbqLeok9b3PQ)3), days);
|
|
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
|
|
T3_ = (NI64)0;
|
|
T3_ = convert__pureZtimes_486(((tyEnum_TimeUnit__52alPn04ElUUbqLeok9b3PQ)4), ((tyEnum_TimeUnit__52alPn04ElUUbqLeok9b3PQ)3), minutes);
|
|
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
|
|
T4_ = (NI64)0;
|
|
T4_ = convert__pureZtimes_486(((tyEnum_TimeUnit__52alPn04ElUUbqLeok9b3PQ)5), ((tyEnum_TimeUnit__52alPn04ElUUbqLeok9b3PQ)3), hours);
|
|
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
|
|
T5_ = (NI64)0;
|
|
T5_ = convert__pureZtimes_486(((tyEnum_TimeUnit__52alPn04ElUUbqLeok9b3PQ)3), ((tyEnum_TimeUnit__52alPn04ElUUbqLeok9b3PQ)3), seconds);
|
|
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
|
|
T6_ = (NI64)0;
|
|
T6_ = convert__pureZtimes_486(((tyEnum_TimeUnit__52alPn04ElUUbqLeok9b3PQ)2), ((tyEnum_TimeUnit__52alPn04ElUUbqLeok9b3PQ)3), milliseconds);
|
|
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
|
|
T7_ = (NI64)0;
|
|
T7_ = convert__pureZtimes_486(((tyEnum_TimeUnit__52alPn04ElUUbqLeok9b3PQ)1), ((tyEnum_TimeUnit__52alPn04ElUUbqLeok9b3PQ)3), microseconds);
|
|
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
|
|
T8_ = (NI64)0;
|
|
T8_ = convert__pureZtimes_486(((tyEnum_TimeUnit__52alPn04ElUUbqLeok9b3PQ)0), ((tyEnum_TimeUnit__52alPn04ElUUbqLeok9b3PQ)3), nanoseconds);
|
|
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
|
|
seconds_2 = (NI64)((NI64)((NI64)((NI64)((NI64)((NI64)((NI64)(T1_ + T2_) + T3_) + T4_) + T5_) + T6_) + T7_) + T8_);
|
|
T9_ = (NI64)0;
|
|
T9_ = convert__pureZtimes_486(((tyEnum_TimeUnit__52alPn04ElUUbqLeok9b3PQ)2), ((tyEnum_TimeUnit__52alPn04ElUUbqLeok9b3PQ)0), (NI64)(milliseconds % IL64(1000)));
|
|
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
|
|
T10_ = (NI64)0;
|
|
T10_ = convert__pureZtimes_486(((tyEnum_TimeUnit__52alPn04ElUUbqLeok9b3PQ)1), ((tyEnum_TimeUnit__52alPn04ElUUbqLeok9b3PQ)0), (NI64)(microseconds % IL64(1000000)));
|
|
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
|
|
nanoseconds_2 = ((NI) ((NI64)((NI64)(T9_ + T10_) + (NI64)(nanoseconds % IL64(1000000000)))));
|
|
result = normalize__pureZtimes_543(seconds_2, ((NI64) (nanoseconds_2)));
|
|
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
|
|
}BeforeRet_: ;
|
|
return result;
|
|
}
|
|
N_LIB_PRIVATE N_NIMCALL(tyTuple__XjuGlLf9cyYx66ViXrBCvPQ, fromEpochDay__pureZtimes_200)(NI64 epochday) {
|
|
tyTuple__XjuGlLf9cyYx66ViXrBCvPQ result;
|
|
NI64 colontmpD_;
|
|
NI64 colontmpD__2;
|
|
NI colontmpD__3;
|
|
NI colontmpD__4;
|
|
NI64 z;
|
|
NI64 era;
|
|
NI64 T1_;
|
|
NI64 doe;
|
|
NI64 yoe;
|
|
NI64 y;
|
|
NI64 doy;
|
|
NI64 mp;
|
|
NI64 d;
|
|
NI64 m;
|
|
NI T7_;
|
|
NI colontmp_;
|
|
tyEnum_Month__JS0JuFvCBbC2GL3xXBnPQw colontmp__2;
|
|
NI colontmp__3;
|
|
{ nimZeroMem((void*)(&result), sizeof(tyTuple__XjuGlLf9cyYx66ViXrBCvPQ));
|
|
colontmpD_ = (NI64)0;
|
|
colontmpD__2 = (NI64)0;
|
|
colontmpD__3 = (NI)0;
|
|
colontmpD__4 = (NI)0;
|
|
z = epochday;
|
|
z += ((NI)719468);
|
|
T1_ = (NI64)0;
|
|
{
|
|
if (!(IL64(0) <= z)) goto LA4_;
|
|
colontmpD_ = z;
|
|
T1_ = colontmpD_;
|
|
}
|
|
goto LA2_;
|
|
LA4_: ;
|
|
{
|
|
colontmpD__2 = (NI64)(z - IL64(146096));
|
|
T1_ = colontmpD__2;
|
|
}
|
|
LA2_: ;
|
|
era = (NI64)(T1_ / IL64(146097));
|
|
doe = (NI64)(z - (NI64)(era * IL64(146097)));
|
|
yoe = (NI64)((NI64)((NI64)((NI64)(doe - (NI64)(doe / IL64(1460))) + (NI64)(doe / IL64(36524))) - (NI64)(doe / IL64(146096))) / IL64(365));
|
|
y = (NI64)(yoe + (NI64)(era * IL64(400)));
|
|
doy = (NI64)(doe - (NI64)((NI64)((NI64)(IL64(365) * yoe) + (NI64)(yoe / IL64(4))) - (NI64)(yoe / IL64(100))));
|
|
mp = (NI64)((NI64)((NI64)(IL64(5) * doy) + IL64(2)) / IL64(153));
|
|
d = (NI64)((NI64)(doy - (NI64)((NI64)((NI64)(IL64(153) * mp) + IL64(2)) / IL64(5))) + IL64(1));
|
|
T7_ = (NI)0;
|
|
{
|
|
if (!(mp < IL64(10))) goto LA10_;
|
|
colontmpD__3 = ((NI)3);
|
|
T7_ = colontmpD__3;
|
|
}
|
|
goto LA8_;
|
|
LA10_: ;
|
|
{
|
|
colontmpD__4 = ((NI)-9);
|
|
T7_ = colontmpD__4;
|
|
}
|
|
LA8_: ;
|
|
m = (NI64)(mp + ((NI64) (T7_)));
|
|
colontmp_ = ((NI) (d));
|
|
colontmp__2 = ((tyEnum_Month__JS0JuFvCBbC2GL3xXBnPQw) (m));
|
|
colontmp__3 = ((NI) ((NI64)(y + ((NI64) ((m <= IL64(2)))))));
|
|
result.Field0 = colontmp_;
|
|
result.Field1 = colontmp__2;
|
|
result.Field2 = colontmp__3;
|
|
goto BeforeRet_;
|
|
}BeforeRet_: ;
|
|
return result;
|
|
}
|
|
static N_INLINE(void, assertValidDate__pureZtimes_145)(NI monthday, tyEnum_Month__JS0JuFvCBbC2GL3xXBnPQw month, NI year) {
|
|
}
|
|
N_LIB_PRIVATE N_NIMCALL(NI64, toEpochDay__pureZtimes_156)(NI monthday, tyEnum_Month__JS0JuFvCBbC2GL3xXBnPQw month, NI year) {
|
|
NI64 result;
|
|
NI colontmpD_;
|
|
NI colontmpD__2;
|
|
NI colontmpD__3;
|
|
NI colontmpD__4;
|
|
tyTuple__47w2DboNEPf69aPgubZdd7Q T1_;
|
|
NI y;
|
|
NI m;
|
|
NI d;
|
|
NI era;
|
|
NI T6_;
|
|
NI yoe;
|
|
NI doy;
|
|
NI T12_;
|
|
NI doe;
|
|
NIM_BOOL* nimErr_;
|
|
{nimErr_ = nimErrorFlag();
|
|
result = (NI64)0;
|
|
colontmpD_ = (NI)0;
|
|
colontmpD__2 = (NI)0;
|
|
colontmpD__3 = (NI)0;
|
|
colontmpD__4 = (NI)0;
|
|
assertValidDate__pureZtimes_145(monthday, month, year);
|
|
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
|
|
T1_.Field0 = year;
|
|
T1_.Field1 = month;
|
|
T1_.Field2 = ((NI) (monthday));
|
|
y = T1_.Field0;
|
|
m = T1_.Field1;
|
|
d = T1_.Field2;
|
|
{
|
|
if (!(m <= ((NI)2))) goto LA4_;
|
|
y -= ((NI)1);
|
|
}
|
|
LA4_: ;
|
|
T6_ = (NI)0;
|
|
{
|
|
if (!(((NI)0) <= y)) goto LA9_;
|
|
colontmpD_ = y;
|
|
T6_ = colontmpD_;
|
|
}
|
|
goto LA7_;
|
|
LA9_: ;
|
|
{
|
|
colontmpD__2 = (NI)(y - ((NI)399));
|
|
T6_ = colontmpD__2;
|
|
}
|
|
LA7_: ;
|
|
era = (NI)(T6_ / ((NI)400));
|
|
yoe = (NI)(y - (NI)(era * ((NI)400)));
|
|
T12_ = (NI)0;
|
|
{
|
|
if (!(((NI)2) < m)) goto LA15_;
|
|
colontmpD__3 = ((NI)-3);
|
|
T12_ = colontmpD__3;
|
|
}
|
|
goto LA13_;
|
|
LA15_: ;
|
|
{
|
|
colontmpD__4 = ((NI)9);
|
|
T12_ = colontmpD__4;
|
|
}
|
|
LA13_: ;
|
|
doy = (NI)((NI)((NI)((NI)((NI)(((NI)153) * (NI)(m + T12_)) + ((NI)2)) / ((NI)5)) + d) - ((NI)1));
|
|
doe = (NI)((NI)((NI)((NI)(yoe * ((NI)365)) + (NI)(yoe / ((NI)4))) - (NI)(yoe / ((NI)100))) + doy);
|
|
result = ((NI64) ((NI)((NI)((NI)(era * ((NI)146097)) + doe) - ((NI)719468))));
|
|
goto BeforeRet_;
|
|
}BeforeRet_: ;
|
|
return result;
|
|
}
|
|
N_LIB_PRIVATE N_NIMCALL(tyEnum_WeekDay__SVfemTA9aCOyua2TJYa6yBg, getDayOfWeek__pureZtimes_278)(NI monthday, tyEnum_Month__JS0JuFvCBbC2GL3xXBnPQw month, NI year) {
|
|
tyEnum_WeekDay__SVfemTA9aCOyua2TJYa6yBg result;
|
|
tyEnum_WeekDay__SVfemTA9aCOyua2TJYa6yBg colontmpD_;
|
|
tyEnum_WeekDay__SVfemTA9aCOyua2TJYa6yBg colontmpD__2;
|
|
NI64 days;
|
|
NI64 T1_;
|
|
NI64 weeks;
|
|
NI64 wd;
|
|
NIM_BOOL* nimErr_;
|
|
{nimErr_ = nimErrorFlag();
|
|
result = (tyEnum_WeekDay__SVfemTA9aCOyua2TJYa6yBg)0;
|
|
colontmpD_ = (tyEnum_WeekDay__SVfemTA9aCOyua2TJYa6yBg)0;
|
|
colontmpD__2 = (tyEnum_WeekDay__SVfemTA9aCOyua2TJYa6yBg)0;
|
|
assertValidDate__pureZtimes_145(monthday, month, year);
|
|
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
|
|
T1_ = (NI64)0;
|
|
T1_ = toEpochDay__pureZtimes_156(monthday, month, year);
|
|
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
|
|
days = (NI64)(T1_ - IL64(3));
|
|
weeks = floorDiv__pureZtimes_284(days, ((NI)7));
|
|
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
|
|
wd = (NI64)(days - (NI64)(weeks * IL64(7)));
|
|
{
|
|
if (!(wd == IL64(0))) goto LA4_;
|
|
colontmpD_ = ((tyEnum_WeekDay__SVfemTA9aCOyua2TJYa6yBg)6);
|
|
result = colontmpD_;
|
|
}
|
|
goto LA2_;
|
|
LA4_: ;
|
|
{
|
|
colontmpD__2 = ((tyEnum_WeekDay__SVfemTA9aCOyua2TJYa6yBg) ((NI64)(wd - IL64(1))));
|
|
result = colontmpD__2;
|
|
}
|
|
LA2_: ;
|
|
}BeforeRet_: ;
|
|
return result;
|
|
}
|
|
N_LIB_PRIVATE N_NIMCALL(NIM_BOOL, isLeapYear__pureZtimes_138)(NI year) {
|
|
NIM_BOOL result;
|
|
NIM_BOOL T1_;
|
|
NIM_BOOL T3_;
|
|
result = (NIM_BOOL)0;
|
|
T1_ = (NIM_BOOL)0;
|
|
T1_ = ((NI)(year % ((NI)4)) == ((NI)0));
|
|
if (!(T1_)) goto LA2_;
|
|
T3_ = (NIM_BOOL)0;
|
|
T3_ = !(((NI)(year % ((NI)100)) == ((NI)0)));
|
|
if (T3_) goto LA4_;
|
|
T3_ = ((NI)(year % ((NI)400)) == ((NI)0));
|
|
LA4_: ;
|
|
T1_ = T3_;
|
|
LA2_: ;
|
|
result = T1_;
|
|
return result;
|
|
}
|
|
N_LIB_PRIVATE N_NIMCALL(NI, getDayOfYear__pureZtimes_247)(NI monthday, tyEnum_Month__JS0JuFvCBbC2GL3xXBnPQw month, NI year) {
|
|
NI result;
|
|
NIM_BOOL* nimErr_;
|
|
{nimErr_ = nimErrorFlag();
|
|
result = (NI)0;
|
|
assertValidDate__pureZtimes_145(monthday, month, year);
|
|
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
|
|
{
|
|
NIM_BOOL T3_;
|
|
T3_ = (NIM_BOOL)0;
|
|
T3_ = isLeapYear__pureZtimes_138(year);
|
|
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
|
|
if (!T3_) goto LA4_;
|
|
result = ((NI) ((NI)((NI)(daysUntilMonthLeap__pureZtimes_253[(month)- 1] + ((NI) (monthday))) - ((NI)1))));
|
|
}
|
|
goto LA1_;
|
|
LA4_: ;
|
|
{
|
|
result = ((NI) ((NI)((NI)(daysUntilMonth__pureZtimes_252[(month)- 1] + ((NI) (monthday))) - ((NI)1))));
|
|
}
|
|
LA1_: ;
|
|
}BeforeRet_: ;
|
|
return result;
|
|
}
|
|
static N_INLINE(void, nimMarkCyclic)(void* p) {
|
|
}
|
|
N_LIB_PRIVATE N_NIMCALL(void, initDateTime__pureZtimes_1394)(tyObject_ZonedTime__WigfH9apQAxJ69bBPh3wB8RQ* zt, tyObject_TimezonecolonObjectType___F8OvqlxXyGXRSiK9c1fCDVw* zone, tyObject_DateTime__d9cK9cyKZPJJxFXUmx8dSpPw* Result) {
|
|
NI colontmpD_;
|
|
NI colontmpD__2;
|
|
NI colontmpD__3;
|
|
NI colontmpD__4;
|
|
NIM_BOOL colontmpD__5;
|
|
NI colontmpD__6;
|
|
tyObject_Time__3y2ZpqsTJLqdZvpC9a0rU2Q adjTime;
|
|
tyObject_Duration__lj9ar6Co3fgk6NgGnVaNpJw T1_;
|
|
NI64 s;
|
|
NI64 epochday;
|
|
NI64 rem;
|
|
NI64 hour;
|
|
NI64 minute;
|
|
NI64 second;
|
|
tyTuple__XjuGlLf9cyYx66ViXrBCvPQ T2_;
|
|
NI d;
|
|
tyEnum_Month__JS0JuFvCBbC2GL3xXBnPQw m;
|
|
NI y;
|
|
tyEnum_WeekDay__SVfemTA9aCOyua2TJYa6yBg T3_;
|
|
NI T4_;
|
|
tyObject_TimezonecolonObjectType___F8OvqlxXyGXRSiK9c1fCDVw* blitTmp;
|
|
NIM_BOOL* nimErr_;
|
|
{nimErr_ = nimErrorFlag();
|
|
colontmpD_ = (NI)0;
|
|
colontmpD__2 = (NI)0;
|
|
colontmpD__3 = (NI)0;
|
|
colontmpD__4 = (NI)0;
|
|
colontmpD__5 = (NIM_BOOL)0;
|
|
colontmpD__6 = (NI)0;
|
|
T1_ = initDuration__pureZtimes_476(IL64(0), IL64(0), IL64(0), ((NI64) ((*zt).utcOffset)), IL64(0), IL64(0), IL64(0), IL64(0));
|
|
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
|
|
adjTime = ntSubTime((*zt).time, T1_);
|
|
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
|
|
s = adjTime.seconds;
|
|
epochday = floorDiv__pureZtimes_284(s, ((NI)86400));
|
|
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
|
|
rem = (NI64)(s - (NI64)(epochday * IL64(86400)));
|
|
hour = (NI64)(rem / IL64(3600));
|
|
rem = (NI64)(rem - (NI64)(hour * IL64(3600)));
|
|
minute = (NI64)(rem / IL64(60));
|
|
rem = (NI64)(rem - (NI64)(minute * IL64(60)));
|
|
second = rem;
|
|
T2_ = fromEpochDay__pureZtimes_200(epochday);
|
|
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
|
|
d = T2_.Field0;
|
|
m = T2_.Field1;
|
|
y = T2_.Field2;
|
|
nimZeroMem((void*)Result, sizeof(tyObject_DateTime__d9cK9cyKZPJJxFXUmx8dSpPw));
|
|
(*Result).Sup.m_type = (&NTIv2__d9cK9cyKZPJJxFXUmx8dSpPw_);
|
|
(*Result).year = y;
|
|
(*Result).monthZero = ((NI) (m));
|
|
(*Result).monthdayZero = ((NI) (d));
|
|
colontmpD_ = ((NI) (hour));
|
|
(*Result).hour = colontmpD_;
|
|
colontmpD__2 = ((NI) (minute));
|
|
(*Result).minute = colontmpD__2;
|
|
colontmpD__3 = ((NI) (second));
|
|
(*Result).second = colontmpD__3;
|
|
colontmpD__4 = (*zt).time.nanosecond;
|
|
(*Result).nanosecond = colontmpD__4;
|
|
T3_ = (tyEnum_WeekDay__SVfemTA9aCOyua2TJYa6yBg)0;
|
|
T3_ = getDayOfWeek__pureZtimes_278(d, m, y);
|
|
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
|
|
(*Result).weekday = T3_;
|
|
T4_ = (NI)0;
|
|
T4_ = getDayOfYear__pureZtimes_247(d, m, y);
|
|
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
|
|
(*Result).yearday = T4_;
|
|
colontmpD__5 = (*zt).isDst;
|
|
(*Result).isDst = colontmpD__5;
|
|
blitTmp = zone;
|
|
nimMarkCyclic(zone);
|
|
(*Result).timezone = blitTmp;
|
|
colontmpD__6 = (*zt).utcOffset;
|
|
(*Result).utcOffset = colontmpD__6;
|
|
}BeforeRet_: ;
|
|
}
|
|
N_LIB_PRIVATE N_NIMCALL(void, zonedTimeFromTime__pureZtimes_1471)(tyObject_TimezonecolonObjectType___F8OvqlxXyGXRSiK9c1fCDVw* zone, tyObject_Time__3y2ZpqsTJLqdZvpC9a0rU2Q time, tyObject_ZonedTime__WigfH9apQAxJ69bBPh3wB8RQ* Result) {
|
|
(*zone).zonedTimeFromTimeImpl.ClE_0? (*zone).zonedTimeFromTimeImpl.ClP_0(time, Result, (*zone).zonedTimeFromTimeImpl.ClE_0):((TM__6NbDwwj5FY059b1gz2AsAZQ_67)((*zone).zonedTimeFromTimeImpl.ClP_0))(time, Result);
|
|
}
|
|
N_LIB_PRIVATE N_NIMCALL(void, inZone__pureZtimes_1514)(tyObject_Time__3y2ZpqsTJLqdZvpC9a0rU2Q time, tyObject_TimezonecolonObjectType___F8OvqlxXyGXRSiK9c1fCDVw* zone, tyObject_DateTime__d9cK9cyKZPJJxFXUmx8dSpPw* Result) {
|
|
tyObject_ZonedTime__WigfH9apQAxJ69bBPh3wB8RQ T1_;
|
|
tyObject_TimezonecolonObjectType___F8OvqlxXyGXRSiK9c1fCDVw* blitTmp;
|
|
NIM_BOOL* nimErr_;
|
|
{nimErr_ = nimErrorFlag();
|
|
nimZeroMem((void*)(&T1_), sizeof(tyObject_ZonedTime__WigfH9apQAxJ69bBPh3wB8RQ));
|
|
zonedTimeFromTime__pureZtimes_1471(zone, time, (&T1_));
|
|
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
|
|
blitTmp = zone;
|
|
nimMarkCyclic(zone);
|
|
initDateTime__pureZtimes_1394((&T1_), blitTmp, Result);
|
|
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
|
|
}BeforeRet_: ;
|
|
}
|
|
N_LIB_PRIVATE N_NIMCALL(void, eqsink___pureZtimes_1294)(tyObject_TimezonecolonObjectType___F8OvqlxXyGXRSiK9c1fCDVw** dest, tyObject_TimezonecolonObjectType___F8OvqlxXyGXRSiK9c1fCDVw* src) {
|
|
tyObject_TimezonecolonObjectType___F8OvqlxXyGXRSiK9c1fCDVw* colontmp_;
|
|
colontmp_ = (*dest);
|
|
(*dest) = src;
|
|
{
|
|
NIM_BOOL T3_;
|
|
T3_ = (NIM_BOOL)0;
|
|
T3_ = nimDecRefIsLastCyclicStatic(colontmp_, (&NTIv2__F8OvqlxXyGXRSiK9c1fCDVw_));
|
|
if (!T3_) goto LA4_;
|
|
eqdestroy___pureZtimes_1300(colontmp_);
|
|
nimRawDispose(colontmp_, ((NI)8));
|
|
}
|
|
LA4_: ;
|
|
}
|
|
N_LIB_PRIVATE N_NIMCALL(tyObject_TimezonecolonObjectType___F8OvqlxXyGXRSiK9c1fCDVw*, newTimezone__pureZtimes_1439)(NimStringV2 name, tyProc__7xnKxEC24cr3qZyj3gX32w zonedTimeFromTimeImpl, tyProc__7xnKxEC24cr3qZyj3gX32w zonedTimeFromAdjTimeImpl) {
|
|
tyObject_TimezonecolonObjectType___F8OvqlxXyGXRSiK9c1fCDVw* result;
|
|
tyObject_TimezonecolonObjectType___F8OvqlxXyGXRSiK9c1fCDVw* T1_;
|
|
NimStringV2 blitTmp;
|
|
tyProc__7xnKxEC24cr3qZyj3gX32w blitTmp_2;
|
|
tyProc__7xnKxEC24cr3qZyj3gX32w blitTmp_3;
|
|
result = NIM_NIL;
|
|
T1_ = NIM_NIL;
|
|
T1_ = (tyObject_TimezonecolonObjectType___F8OvqlxXyGXRSiK9c1fCDVw*) nimNewObjUninit(sizeof(tyObject_TimezonecolonObjectType___F8OvqlxXyGXRSiK9c1fCDVw), NIM_ALIGNOF(tyObject_TimezonecolonObjectType___F8OvqlxXyGXRSiK9c1fCDVw));
|
|
blitTmp = name;
|
|
(*T1_).name = blitTmp;
|
|
nimZeroMem((void*)(&blitTmp_2), sizeof(tyProc__7xnKxEC24cr3qZyj3gX32w));
|
|
blitTmp_2.ClE_0 = zonedTimeFromTimeImpl.ClE_0;
|
|
blitTmp_2.ClP_0 = zonedTimeFromTimeImpl.ClP_0;
|
|
nimMarkCyclic(zonedTimeFromTimeImpl.ClE_0);
|
|
(*T1_).zonedTimeFromTimeImpl.ClE_0 = blitTmp_2.ClE_0;
|
|
(*T1_).zonedTimeFromTimeImpl.ClP_0 = blitTmp_2.ClP_0;
|
|
nimZeroMem((void*)(&blitTmp_3), sizeof(tyProc__7xnKxEC24cr3qZyj3gX32w));
|
|
blitTmp_3.ClE_0 = zonedTimeFromAdjTimeImpl.ClE_0;
|
|
blitTmp_3.ClP_0 = zonedTimeFromAdjTimeImpl.ClP_0;
|
|
nimMarkCyclic(zonedTimeFromAdjTimeImpl.ClE_0);
|
|
(*T1_).zonedTimeFromAdjTimeImpl.ClE_0 = blitTmp_3.ClE_0;
|
|
(*T1_).zonedTimeFromAdjTimeImpl.ClP_0 = blitTmp_3.ClP_0;
|
|
result = T1_;
|
|
return result;
|
|
}
|
|
N_LIB_PRIVATE N_NIMCALL(void, utcTzInfo__pureZtimes_1652)(tyObject_Time__3y2ZpqsTJLqdZvpC9a0rU2Q time, tyObject_ZonedTime__WigfH9apQAxJ69bBPh3wB8RQ* Result) {
|
|
tyObject_Time__3y2ZpqsTJLqdZvpC9a0rU2Q colontmpD_;
|
|
nimZeroMem((void*)(&colontmpD_), sizeof(tyObject_Time__3y2ZpqsTJLqdZvpC9a0rU2Q));
|
|
nimZeroMem((void*)Result, sizeof(tyObject_ZonedTime__WigfH9apQAxJ69bBPh3wB8RQ));
|
|
(*Result).utcOffset = ((NI)0);
|
|
(*Result).isDst = NIM_FALSE;
|
|
colontmpD_ = time;
|
|
(*Result).time = colontmpD_;
|
|
}
|
|
static N_INLINE(void, nimIncRefCyclic)(void* p, NIM_BOOL cyclic) {
|
|
tyObject_RefHeader__Gi7WQzlT1ZRToh9a2ueYb4A* h;
|
|
NI T1_;
|
|
T1_ = (NI)0;
|
|
T1_ = minuspercent___system_790(((NI) (ptrdiff_t) (p)), ((NI)16));
|
|
h = ((tyObject_RefHeader__Gi7WQzlT1ZRToh9a2ueYb4A*) (T1_));
|
|
(*h).rc += ((NI)16);
|
|
}
|
|
N_LIB_PRIVATE N_NIMCALL(void, eqcopy___pureZtimes_1290)(tyObject_TimezonecolonObjectType___F8OvqlxXyGXRSiK9c1fCDVw** dest, tyObject_TimezonecolonObjectType___F8OvqlxXyGXRSiK9c1fCDVw* src, NIM_BOOL cyclic) {
|
|
tyObject_TimezonecolonObjectType___F8OvqlxXyGXRSiK9c1fCDVw* colontmp_;
|
|
colontmp_ = (*dest);
|
|
{
|
|
if (!src) goto LA3_;
|
|
nimIncRefCyclic(src, cyclic);
|
|
}
|
|
LA3_: ;
|
|
(*dest) = src;
|
|
{
|
|
NIM_BOOL T7_;
|
|
T7_ = (NIM_BOOL)0;
|
|
T7_ = nimDecRefIsLastCyclicStatic(colontmp_, (&NTIv2__F8OvqlxXyGXRSiK9c1fCDVw_));
|
|
if (!T7_) goto LA8_;
|
|
eqdestroy___pureZtimes_1300(colontmp_);
|
|
nimRawDispose(colontmp_, ((NI)8));
|
|
}
|
|
LA8_: ;
|
|
}
|
|
N_LIB_PRIVATE N_NIMCALL(tyObject_TimezonecolonObjectType___F8OvqlxXyGXRSiK9c1fCDVw*, utc__pureZtimes_1657)(void) {
|
|
tyObject_TimezonecolonObjectType___F8OvqlxXyGXRSiK9c1fCDVw* result;
|
|
NIM_BOOL* nimErr_;
|
|
{nimErr_ = nimErrorFlag();
|
|
result = NIM_NIL;
|
|
{
|
|
tyProc__7xnKxEC24cr3qZyj3gX32w T5_;
|
|
tyProc__7xnKxEC24cr3qZyj3gX32w T6_;
|
|
tyObject_TimezonecolonObjectType___F8OvqlxXyGXRSiK9c1fCDVw* T7_;
|
|
if (!(utcInstance__pureZtimes_1655 == 0)) goto LA3_;
|
|
nimZeroMem((void*)(&T5_), sizeof(tyProc__7xnKxEC24cr3qZyj3gX32w));
|
|
T5_.ClP_0 = ((TM__6NbDwwj5FY059b1gz2AsAZQ_69) (utcTzInfo__pureZtimes_1652)); T5_.ClE_0 = NIM_NIL;
|
|
nimZeroMem((void*)(&T6_), sizeof(tyProc__7xnKxEC24cr3qZyj3gX32w));
|
|
T6_.ClP_0 = ((TM__6NbDwwj5FY059b1gz2AsAZQ_70) (utcTzInfo__pureZtimes_1652)); T6_.ClE_0 = NIM_NIL;
|
|
T7_ = NIM_NIL;
|
|
T7_ = newTimezone__pureZtimes_1439(TM__6NbDwwj5FY059b1gz2AsAZQ_68, T5_, T6_);
|
|
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
|
|
eqsink___pureZtimes_1294(&utcInstance__pureZtimes_1655, T7_);
|
|
}
|
|
LA3_: ;
|
|
eqcopy___pureZtimes_1290(&result, utcInstance__pureZtimes_1655, NIM_FALSE);
|
|
}BeforeRet_: ;
|
|
return result;
|
|
}
|
|
N_LIB_PRIVATE N_NIMCALL(void, utc__pureZtimes_1685)(tyObject_Time__3y2ZpqsTJLqdZvpC9a0rU2Q t, tyObject_DateTime__d9cK9cyKZPJJxFXUmx8dSpPw* Result) {
|
|
tyObject_TimezonecolonObjectType___F8OvqlxXyGXRSiK9c1fCDVw* T1_;
|
|
NIM_BOOL* nimErr_;
|
|
{nimErr_ = nimErrorFlag();
|
|
T1_ = NIM_NIL;
|
|
T1_ = utc__pureZtimes_1657();
|
|
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
|
|
inZone__pureZtimes_1514(t, T1_, Result);
|
|
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
|
|
}BeforeRet_: ;
|
|
}
|
|
N_LIB_PRIVATE N_NIMCALL(tyObject_Time__3y2ZpqsTJLqdZvpC9a0rU2Q, fromUnix__pureZtimes_1020)(NI64 unix_0) {
|
|
tyObject_Time__3y2ZpqsTJLqdZvpC9a0rU2Q result;
|
|
NIM_BOOL* nimErr_;
|
|
{nimErr_ = nimErrorFlag();
|
|
nimZeroMem((void*)(&result), sizeof(tyObject_Time__3y2ZpqsTJLqdZvpC9a0rU2Q));
|
|
result = initTime__pureZtimes_1013(unix_0, ((NI)0));
|
|
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
|
|
}BeforeRet_: ;
|
|
return result;
|
|
}
|
|
N_LIB_PRIVATE N_NIMCALL(NimStringV2, format__options_612)(tyObject_DateTime__d9cK9cyKZPJJxFXUmx8dSpPw* dt) {
|
|
NimStringV2 result;
|
|
NIM_BOOL* nimErr_;
|
|
{nimErr_ = nimErrorFlag();
|
|
result.len = 0; result.p = NIM_NIL;
|
|
result = format__pureZtimes_3590(dt, (&f2__options_617), (&DefaultLocale__pureZtimes_1852));
|
|
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
|
|
}BeforeRet_: ;
|
|
return result;
|
|
}
|
|
N_LIB_PRIVATE N_NIMCALL(NI64, toUnix__pureZtimes_1035)(tyObject_Time__3y2ZpqsTJLqdZvpC9a0rU2Q t) {
|
|
NI64 result;
|
|
result = (NI64)0;
|
|
result = t.seconds;
|
|
return result;
|
|
}
|
|
static N_INLINE(NF, toBiggestFloat__system_1675)(NI64 i) {
|
|
NF result;
|
|
result = (NF)0;
|
|
result = ((NF) (i));
|
|
return result;
|
|
}
|
|
N_LIB_PRIVATE N_NIMCALL(NF, epochTime__pureZtimes_4284)(void) {
|
|
NF result;
|
|
struct timespec ts;
|
|
int T1_;
|
|
NF T2_;
|
|
NF T3_;
|
|
result = (NF)0;
|
|
T1_ = (int)0;
|
|
T1_ = clock_gettime(((int)0), (&ts));
|
|
(void)(T1_);
|
|
T2_ = (NF)0;
|
|
T2_ = toBiggestFloat__system_1675(((NI64) (ts.tv_sec)));
|
|
T3_ = (NF)0;
|
|
T3_ = toBiggestFloat__system_1675(((NI64) (ts.tv_nsec)));
|
|
result = ((NF)(T2_) + (NF)(((NF)(T3_) / (NF)(1000000000.0))));
|
|
return result;
|
|
}
|
|
N_LIB_PRIVATE N_NIMCALL(NIM_BOOL, ntLtTime)(tyObject_Time__3y2ZpqsTJLqdZvpC9a0rU2Q a, tyObject_Time__3y2ZpqsTJLqdZvpC9a0rU2Q b) {
|
|
NIM_BOOL result;
|
|
NIM_BOOL T1_;
|
|
NIM_BOOL T3_;
|
|
result = (NIM_BOOL)0;
|
|
T1_ = (NIM_BOOL)0;
|
|
T1_ = (a.seconds < b.seconds);
|
|
if (T1_) goto LA2_;
|
|
T3_ = (NIM_BOOL)0;
|
|
T3_ = (a.seconds == b.seconds);
|
|
if (!(T3_)) goto LA4_;
|
|
T3_ = (((NI) (a.nanosecond)) < ((NI) (b.nanosecond)));
|
|
LA4_: ;
|
|
T1_ = T3_;
|
|
LA2_: ;
|
|
result = T1_;
|
|
return result;
|
|
}
|
|
N_LIB_PRIVATE N_NIMCALL(NI64, toAdjUnix__pureZtimes_1545)(struct tm tm) {
|
|
NI64 result;
|
|
NI64 epochDay;
|
|
NIM_BOOL* nimErr_;
|
|
{nimErr_ = nimErrorFlag();
|
|
result = (NI64)0;
|
|
epochDay = toEpochDay__pureZtimes_156(((NI) (tm.tm_mday)), ((tyEnum_Month__JS0JuFvCBbC2GL3xXBnPQw) ((NI32)(tm.tm_mon + ((NI32)1)))), (NI)(((NI) (tm.tm_year)) + ((NI)1900)));
|
|
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
|
|
result = (NI64)(epochDay * IL64(86400));
|
|
result += (NI32)(tm.tm_hour * ((NI32)3600));
|
|
result += (NI32)(tm.tm_min * ((NI32)60));
|
|
result += tm.tm_sec;
|
|
}BeforeRet_: ;
|
|
return result;
|
|
}
|
|
N_LIB_PRIVATE N_NIMCALL(tyTuple__pfrdooyxJsC6cg34ebuBag, getLocalOffsetAndDst__pureZtimes_1564)(NI64 unix_0) {
|
|
tyTuple__pfrdooyxJsC6cg34ebuBag result;
|
|
long a;
|
|
NI64 T1_;
|
|
struct tm* tmPtr;
|
|
NI colontmp__3;
|
|
NIM_BOOL colontmp__4;
|
|
NIM_BOOL* nimErr_;
|
|
{nimErr_ = nimErrorFlag();
|
|
nimZeroMem((void*)(&result), sizeof(tyTuple__pfrdooyxJsC6cg34ebuBag));
|
|
T1_ = (NI64)0;
|
|
T1_ = clamp__pureZtimes_1577(unix_0, (IL64(-9223372036854775807) - IL64(1)), IL64(9223372036854775807));
|
|
a = ((long) (T1_));
|
|
tmPtr = localtime((&a));
|
|
{
|
|
struct tm tm;
|
|
NI colontmp_;
|
|
NI64 T6_;
|
|
NIM_BOOL colontmp__2;
|
|
if (!!((tmPtr == 0))) goto LA4_;
|
|
tm = (*tmPtr);
|
|
T6_ = (NI64)0;
|
|
T6_ = toAdjUnix__pureZtimes_1545(tm);
|
|
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
|
|
colontmp_ = ((NI) ((NI64)(((NI64) (a)) - T6_)));
|
|
colontmp__2 = (((NI32)0) < tm.tm_isdst);
|
|
result.Field0 = colontmp_;
|
|
result.Field1 = colontmp__2;
|
|
goto BeforeRet_;
|
|
}
|
|
LA4_: ;
|
|
colontmp__3 = ((NI)0);
|
|
colontmp__4 = NIM_FALSE;
|
|
result.Field0 = colontmp__3;
|
|
result.Field1 = colontmp__4;
|
|
goto BeforeRet_;
|
|
}BeforeRet_: ;
|
|
return result;
|
|
}
|
|
N_LIB_PRIVATE N_NIMCALL(void, localZonedTimeFromTime__pureZtimes_1625)(tyObject_Time__3y2ZpqsTJLqdZvpC9a0rU2Q time, tyObject_ZonedTime__WigfH9apQAxJ69bBPh3wB8RQ* Result) {
|
|
tyTuple__pfrdooyxJsC6cg34ebuBag T1_;
|
|
NI offset;
|
|
NIM_BOOL dst;
|
|
NIM_BOOL* nimErr_;
|
|
{nimErr_ = nimErrorFlag();
|
|
nimZeroMem((void*)Result, sizeof(tyObject_ZonedTime__WigfH9apQAxJ69bBPh3wB8RQ));
|
|
T1_ = getLocalOffsetAndDst__pureZtimes_1564(time.seconds);
|
|
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
|
|
offset = T1_.Field0;
|
|
dst = T1_.Field1;
|
|
(*Result).time = time;
|
|
(*Result).utcOffset = offset;
|
|
(*Result).isDst = dst;
|
|
}BeforeRet_: ;
|
|
}
|
|
N_LIB_PRIVATE N_NIMCALL(void, localZonedTimeFromAdjTime__pureZtimes_1630)(tyObject_Time__3y2ZpqsTJLqdZvpC9a0rU2Q adjTime, tyObject_ZonedTime__WigfH9apQAxJ69bBPh3wB8RQ* Result) {
|
|
NI64 adjUnix;
|
|
NI64 past;
|
|
tyTuple__pfrdooyxJsC6cg34ebuBag T1_;
|
|
NI pastOffset;
|
|
NIM_BOOL _;
|
|
NI64 future;
|
|
tyTuple__pfrdooyxJsC6cg34ebuBag T2_;
|
|
NI futureOffset;
|
|
NIM_BOOL __2;
|
|
NI utcOffset;
|
|
NI64 utcUnix;
|
|
tyTuple__pfrdooyxJsC6cg34ebuBag T13_;
|
|
NI finalOffset;
|
|
NIM_BOOL dst;
|
|
tyObject_Time__3y2ZpqsTJLqdZvpC9a0rU2Q T14_;
|
|
NIM_BOOL* nimErr_;
|
|
{nimErr_ = nimErrorFlag();
|
|
nimZeroMem((void*)Result, sizeof(tyObject_ZonedTime__WigfH9apQAxJ69bBPh3wB8RQ));
|
|
adjUnix = adjTime.seconds;
|
|
past = (NI64)(adjUnix - IL64(86400));
|
|
T1_ = getLocalOffsetAndDst__pureZtimes_1564(past);
|
|
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
|
|
pastOffset = T1_.Field0;
|
|
_ = T1_.Field1;
|
|
future = (NI64)(adjUnix + IL64(86400));
|
|
T2_ = getLocalOffsetAndDst__pureZtimes_1564(future);
|
|
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
|
|
futureOffset = T2_.Field0;
|
|
__2 = T2_.Field1;
|
|
utcOffset = (NI)0;
|
|
{
|
|
if (!(pastOffset == futureOffset)) goto LA5_;
|
|
utcOffset = pastOffset;
|
|
}
|
|
goto LA3_;
|
|
LA5_: ;
|
|
{
|
|
tyTuple__pfrdooyxJsC6cg34ebuBag T12_;
|
|
{
|
|
if (!(futureOffset < pastOffset)) goto LA10_;
|
|
adjUnix -= ((NI)3600);
|
|
}
|
|
LA10_: ;
|
|
adjUnix += ((NI64) (pastOffset));
|
|
T12_ = getLocalOffsetAndDst__pureZtimes_1564(adjUnix);
|
|
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
|
|
utcOffset = T12_.Field0;
|
|
}
|
|
LA3_: ;
|
|
utcUnix = (NI64)(adjTime.seconds + ((NI64) (utcOffset)));
|
|
T13_ = getLocalOffsetAndDst__pureZtimes_1564(utcUnix);
|
|
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
|
|
finalOffset = T13_.Field0;
|
|
dst = T13_.Field1;
|
|
nimZeroMem((void*)(&T14_), sizeof(tyObject_Time__3y2ZpqsTJLqdZvpC9a0rU2Q));
|
|
T14_ = initTime__pureZtimes_1013(utcUnix, adjTime.nanosecond);
|
|
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
|
|
(*Result).time = T14_;
|
|
(*Result).utcOffset = finalOffset;
|
|
(*Result).isDst = dst;
|
|
}BeforeRet_: ;
|
|
}
|
|
N_LIB_PRIVATE N_NIMCALL(tyObject_TimezonecolonObjectType___F8OvqlxXyGXRSiK9c1fCDVw*, local__pureZtimes_1674)(void) {
|
|
tyObject_TimezonecolonObjectType___F8OvqlxXyGXRSiK9c1fCDVw* result;
|
|
NIM_BOOL* nimErr_;
|
|
{nimErr_ = nimErrorFlag();
|
|
result = NIM_NIL;
|
|
{
|
|
tyProc__7xnKxEC24cr3qZyj3gX32w T5_;
|
|
tyProc__7xnKxEC24cr3qZyj3gX32w T6_;
|
|
tyObject_TimezonecolonObjectType___F8OvqlxXyGXRSiK9c1fCDVw* T7_;
|
|
if (!(localInstance__pureZtimes_1656 == 0)) goto LA3_;
|
|
nimZeroMem((void*)(&T5_), sizeof(tyProc__7xnKxEC24cr3qZyj3gX32w));
|
|
T5_.ClP_0 = ((TM__6NbDwwj5FY059b1gz2AsAZQ_75) (localZonedTimeFromTime__pureZtimes_1625)); T5_.ClE_0 = NIM_NIL;
|
|
nimZeroMem((void*)(&T6_), sizeof(tyProc__7xnKxEC24cr3qZyj3gX32w));
|
|
T6_.ClP_0 = ((TM__6NbDwwj5FY059b1gz2AsAZQ_76) (localZonedTimeFromAdjTime__pureZtimes_1630)); T6_.ClE_0 = NIM_NIL;
|
|
T7_ = NIM_NIL;
|
|
T7_ = newTimezone__pureZtimes_1439(TM__6NbDwwj5FY059b1gz2AsAZQ_74, T5_, T6_);
|
|
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
|
|
eqsink___pureZtimes_1294(&localInstance__pureZtimes_1656, T7_);
|
|
}
|
|
LA3_: ;
|
|
eqcopy___pureZtimes_1290(&result, localInstance__pureZtimes_1656, NIM_FALSE);
|
|
}BeforeRet_: ;
|
|
return result;
|
|
}
|
|
N_LIB_PRIVATE N_NIMCALL(void, local__pureZtimes_1688)(tyObject_Time__3y2ZpqsTJLqdZvpC9a0rU2Q t, tyObject_DateTime__d9cK9cyKZPJJxFXUmx8dSpPw* Result) {
|
|
tyObject_TimezonecolonObjectType___F8OvqlxXyGXRSiK9c1fCDVw* T1_;
|
|
NIM_BOOL* nimErr_;
|
|
{nimErr_ = nimErrorFlag();
|
|
T1_ = NIM_NIL;
|
|
T1_ = local__pureZtimes_1674();
|
|
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
|
|
inZone__pureZtimes_1514(t, T1_, Result);
|
|
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
|
|
}BeforeRet_: ;
|
|
}
|
|
N_LIB_PRIVATE N_NIMCALL(void, now__pureZtimes_1691)(tyObject_DateTime__d9cK9cyKZPJJxFXUmx8dSpPw* Result) {
|
|
tyObject_Time__3y2ZpqsTJLqdZvpC9a0rU2Q T1_;
|
|
NIM_BOOL* nimErr_;
|
|
{nimErr_ = nimErrorFlag();
|
|
T1_ = getTime__pureZtimes_1086();
|
|
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
|
|
local__pureZtimes_1688(T1_, Result);
|
|
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
|
|
}BeforeRet_: ;
|
|
}
|
|
N_LIB_PRIVATE N_NIMCALL(NimStringV2, format__extccomp_1264)(tyObject_DateTime__d9cK9cyKZPJJxFXUmx8dSpPw* dt) {
|
|
NimStringV2 result;
|
|
NIM_BOOL* nimErr_;
|
|
{nimErr_ = nimErrorFlag();
|
|
result.len = 0; result.p = NIM_NIL;
|
|
result = format__pureZtimes_3590(dt, (&f2__extccomp_1269), (&DefaultLocale__pureZtimes_1852));
|
|
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
|
|
}BeforeRet_: ;
|
|
return result;
|
|
}
|