blob: 957f12e4f230e7b4ade8630fc0b3113812224a77 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
|
// © 2022 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html
#ifndef ISO8601CAL_H
#define ISO8601CAL_H
#include "unicode/utypes.h"
#if !UCONFIG_NO_FORMATTING
#include "unicode/calendar.h"
#include "unicode/gregocal.h"
#include "unicode/timezone.h"
U_NAMESPACE_BEGIN
/**
* Concrete class which provides the ISO8601 calendar.
* <P>
* <code>ISO8601Calendar</code> is a subclass of <code>GregorianCalendar</code>
* that the first day of a week is Monday and the minimal days in the first
* week of a year or month is four days.
* <p>
* The ISO8601 calendar is identical to the Gregorian calendar in all respects
* except for the first day of week and the minimal days in the first week
* of a year.
* @internal
*/
class ISO8601Calendar : public GregorianCalendar {
public:
//-------------------------------------------------------------------------
// Constructors...
//-------------------------------------------------------------------------
/**
* Constructs a DangiCalendar based on the current time in the default time zone
* with the given locale.
*
* @param aLocale The given locale.
* @param success Indicates the status of ISO8601Calendar object construction.
* Returns U_ZERO_ERROR if constructed successfully.
* @internal
*/
ISO8601Calendar(const Locale& aLocale, UErrorCode &success);
/**
* Copy Constructor
* @internal
*/
ISO8601Calendar(const ISO8601Calendar& other) = default;
/**
* Destructor.
* @internal
*/
virtual ~ISO8601Calendar();
/**
* Clone.
* @internal
*/
virtual ISO8601Calendar* clone() const override;
// UObject stuff
public:
/**
* @return The class ID for this object. All objects of a given class have the
* same class ID. Objects of other classes have different class IDs.
* @internal
*/
virtual UClassID getDynamicClassID() const override;
/**
* Return the class ID for this class. This is useful only for comparing to a return
* value from getDynamicClassID(). For example:
*
* Base* polymorphic_pointer = createPolymorphicObject();
* if (polymorphic_pointer->getDynamicClassID() ==
* Derived::getStaticClassID()) ...
*
* @return The class ID for all objects of this class.
* @internal
*/
U_I18N_API static UClassID U_EXPORT2 getStaticClassID();
/**
* return the calendar type, "iso8601".
*
* @return calendar type
* @internal
*/
virtual const char * getType() const override;
protected:
virtual bool isEra0CountingBackward() const override { return false; }
private:
ISO8601Calendar(); // default constructor not implemented
};
U_NAMESPACE_END
#endif
#endif
|