line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
#pragma once |
2
|
|
|
|
|
|
|
#include |
3
|
|
|
|
|
|
|
#include |
4
|
|
|
|
|
|
|
#include |
5
|
|
|
|
|
|
|
#include |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
namespace xs { namespace date { |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
using namespace panda::date; |
10
|
|
|
|
|
|
|
using namespace panda::time; |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
extern panda::string_view strict_hint_name; |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
inline bool is_strict_mode () { return Scope::Hints::exists(strict_hint_name); } |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
Date sv2date (const Sv& arg, const TimezoneSP& zone = {}, int fmt = Date::InputFormat::all); |
17
|
|
|
|
|
|
|
DateRel sv2daterel (const Sv& arg); |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
}} |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
namespace xs { |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
template <> struct Typemap : TypemapObject { |
24
|
0
|
0
|
|
|
|
|
static std::string package () { return "Date::Timezone"; } |
25
|
|
|
|
|
|
|
}; |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
template <> struct Typemap : Typemap { |
28
|
|
|
|
|
|
|
using Super = Typemap; |
29
|
|
|
|
|
|
|
|
30
|
0
|
|
|
|
|
|
static inline panda::time::TimezoneSP in (const Sv& arg) { |
31
|
0
|
0
|
|
|
|
|
if (arg.is_object_ref()) return Super::in(arg); |
32
|
0
|
0
|
|
|
|
|
if (!arg) return {}; |
33
|
0
|
0
|
|
|
|
|
if (!arg.is_true()) return panda::time::tzlocal(); |
34
|
0
|
0
|
|
|
|
|
return panda::time::tzget(xs::in(arg)); |
35
|
|
|
|
|
|
|
} |
36
|
|
|
|
|
|
|
}; |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
template struct Typemap : TypemapObject { |
39
|
0
|
0
|
|
|
|
|
static std::string package () { return "Date"; } |
40
|
|
|
|
|
|
|
}; |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
template <> struct Typemap : TypemapBase { |
43
|
|
|
|
|
|
|
static inline panda::date::Date in (const Sv& arg) { return xs::date::sv2date(arg); } |
44
|
|
|
|
|
|
|
static inline Sv out (const panda::date::Date& v, const Sv& proto = Sv()) { return xs::out(new panda::date::Date(v), proto); } |
45
|
|
|
|
|
|
|
}; |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
template struct Typemap : TypemapObject { |
48
|
0
|
0
|
|
|
|
|
static std::string package () { return "Date::Rel"; } |
|
|
0
|
|
|
|
|
|
49
|
|
|
|
|
|
|
}; |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
template <> struct Typemap : TypemapBase { |
52
|
|
|
|
|
|
|
static inline panda::date::DateRel in (const Sv& arg) { return xs::date::sv2daterel(arg); } |
53
|
|
|
|
|
|
|
static inline Sv out (const panda::date::DateRel& v, const Sv& proto = Sv()) { return xs::out(new panda::date::DateRel(v), proto); } |
54
|
|
|
|
|
|
|
}; |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
} |