java.lang.Object
com.aspose.words.SdtCalendarType
public class SdtCalendarType
- extends java.lang.Object
Utility class containing constants.
Specifies the possible types of calendars which can be used to specify StructuredDocumentTag.CalendarType
in an Office Open XML document.
Example:
Shows how to prompt the user to enter a date with a structured document tag.
Document doc = new Document();
// Insert a structured document tag that prompts the user to enter a date.
// In Microsoft Word, this element is known as a "Date picker content control".
// When we click on the arrow on the right end of this tag in Microsoft Word,
// we will see a pop up in the form of a clickable calendar.
// We can use that popup to select a date that the tag will display.
StructuredDocumentTag sdtDate = new StructuredDocumentTag(doc, SdtType.DATE, MarkupLevel.INLINE);
// Display the date, according to the Saudi Arabian Arabic locale.
sdtDate.setDateDisplayLocale(1025);
// Set the format with which to display the date.
sdtDate.setDateDisplayFormat("dd MMMM, yyyy");
sdtDate.setDateStorageFormat(SdtDateStorageFormat.DATE_TIME);
// Display the date according to the Hijri calendar.
sdtDate.setCalendarType(SdtCalendarType.HIJRI);
// Before the user chooses a date in Microsoft Word, the tag will display the text "Click here to enter a date.".
// According to the tag's calendar, set the "FullDate" property to get the tag to display a default date.
Calendar cal = Calendar.getInstance();
cal.set(1440, 10, 20);
sdtDate.setFullDate(cal.getTime());
DocumentBuilder builder = new DocumentBuilder(doc);
builder.insertNode(sdtDate);
doc.save(getArtifactsDir() + "StructuredDocumentTag.Date.docx");
|
Field Summary |
static final int | DEFAULT = 0 | |
|
Used as default value in OOXML. Equals GREGORIAN.
|
static final int | GREGORIAN = 0 | |
|
Specifies that the Gregorian calendar, as defined in ISO 8601, shall be used.
This calendar should be localized into the appropriate language.
|
static final int | GREGORIAN_ARABIC = 1 | |
|
Specifies that the Gregorian calendar, as defined in ISO 8601, shall be used.
The values for this calendar should be presented in Arabic.
|
static final int | GREGORIAN_ME_FRENCH = 2 | |
|
Specifies that the Gregorian calendar, as defined in ISO 8601, shall be used.
The values for this calendar should be presented in Middle East French.
|
static final int | GREGORIAN_US = 3 | |
|
Specifies that the Gregorian calendar, as defined in ISO 8601, shall be used.
The values for this calendar should be presented in English.
|
static final int | GREGORIAN_XLIT_ENGLISH = 4 | |
|
Specifies that the Gregorian calendar, as defined in ISO 8601, shall be used.
The values for this calendar should be the representation of the English strings in the corresponding Arabic characters
(the Arabic transliteration of the English for the Gregorian calendar).
|
static final int | GREGORIAN_XLIT_FRENCH = 5 | |
|
Specifies that the Gregorian calendar, as defined in ISO 8601, shall be used.
The values for this calendar should be the representation of the French strings in the corresponding Arabic characters
(the Arabic transliteration of the French for the Gregorian calendar).
|
static final int | HEBREW = 6 | |
|
Specifies that the Hebrew lunar calendar, as described by the Gauss formula for Passover [CITATION]
and The Complete Restatement of Oral Law (Mishneh Torah),shall be used.
|
static final int | HIJRI = 7 | |
|
Specifies that the Hijri lunar calendar, as described by the Kingdom of Saudi Arabia,
Ministry of Islamic Affairs, Endowments, Da‘wah and Guidance, shall be used.
|
static final int | JAPAN = 8 | |
|
Specifies that the Japanese Emperor Era calendar, as described by
Japanese Industrial Standard JIS X 0301, shall be used.
|
static final int | KOREA = 9 | |
|
Specifies that the Korean Tangun Era calendar,
as described by Korean Law Enactment No. 4, shall be used.
|
static final int | NONE = 10 | |
|
Specifies that no calendar should be used.
|
static final int | SAKA = 11 | |
|
Specifies that the Saka Era calendar, as described by the Calendar Reform Committee of India,
as part of the Indian Ephemeris and Nautical Almanac, shall be used.
|
static final int | TAIWAN = 12 | |
|
Specifies that the Taiwanese calendar, as defined by the Chinese National Standard CNS 7648, shall be used.
|
static final int | THAI = 13 | |
|
Specifies that the Thai calendar, as defined by the Royal Decree of H.M. King Vajiravudh (Rama VI) in
Royal Gazette B. E. 2456 (1913 A.D.) and by the decree of Prime Minister Phibunsongkhram (1941 A.D.) to
start the year on the Gregorian January 1 and to map year zero to Gregorian year 543 B.C., shall be used.
|
DEFAULT = 0 | |
public static final int DEFAULT |
-
Used as default value in OOXML. Equals GREGORIAN.
GREGORIAN = 0 | |
public static final int GREGORIAN |
-
Specifies that the Gregorian calendar, as defined in ISO 8601, shall be used.
This calendar should be localized into the appropriate language.
GREGORIAN_ARABIC = 1 | |
public static final int GREGORIAN_ARABIC |
-
Specifies that the Gregorian calendar, as defined in ISO 8601, shall be used.
The values for this calendar should be presented in Arabic.
GREGORIAN_ME_FRENCH = 2 | |
public static final int GREGORIAN_ME_FRENCH |
-
Specifies that the Gregorian calendar, as defined in ISO 8601, shall be used.
The values for this calendar should be presented in Middle East French.
GREGORIAN_US = 3 | |
public static final int GREGORIAN_US |
-
Specifies that the Gregorian calendar, as defined in ISO 8601, shall be used.
The values for this calendar should be presented in English.
GREGORIAN_XLIT_ENGLISH = 4 | |
public static final int GREGORIAN_XLIT_ENGLISH |
-
Specifies that the Gregorian calendar, as defined in ISO 8601, shall be used.
The values for this calendar should be the representation of the English strings in the corresponding Arabic characters
(the Arabic transliteration of the English for the Gregorian calendar).
GREGORIAN_XLIT_FRENCH = 5 | |
public static final int GREGORIAN_XLIT_FRENCH |
-
Specifies that the Gregorian calendar, as defined in ISO 8601, shall be used.
The values for this calendar should be the representation of the French strings in the corresponding Arabic characters
(the Arabic transliteration of the French for the Gregorian calendar).
HEBREW = 6 | |
public static final int HEBREW |
-
Specifies that the Hebrew lunar calendar, as described by the Gauss formula for Passover [CITATION]
and The Complete Restatement of Oral Law (Mishneh Torah),shall be used.
HIJRI = 7 | |
public static final int HIJRI |
-
Specifies that the Hijri lunar calendar, as described by the Kingdom of Saudi Arabia,
Ministry of Islamic Affairs, Endowments, Da‘wah and Guidance, shall be used.
JAPAN = 8 | |
public static final int JAPAN |
-
Specifies that the Japanese Emperor Era calendar, as described by
Japanese Industrial Standard JIS X 0301, shall be used.
KOREA = 9 | |
public static final int KOREA |
-
Specifies that the Korean Tangun Era calendar,
as described by Korean Law Enactment No. 4, shall be used.
NONE = 10 | |
public static final int NONE |
-
Specifies that no calendar should be used.
Usually in AW, None is the first and default value for enums, but not in this case.
None is not default for OOXML, instead GREGORIAN is default and is first member of this enum.
SAKA = 11 | |
public static final int SAKA |
-
Specifies that the Saka Era calendar, as described by the Calendar Reform Committee of India,
as part of the Indian Ephemeris and Nautical Almanac, shall be used.
TAIWAN = 12 | |
public static final int TAIWAN |
-
Specifies that the Taiwanese calendar, as defined by the Chinese National Standard CNS 7648, shall be used.
THAI = 13 | |
public static final int THAI |
-
Specifies that the Thai calendar, as defined by the Royal Decree of H.M. King Vajiravudh (Rama VI) in
Royal Gazette B. E. 2456 (1913 A.D.) and by the decree of Prime Minister Phibunsongkhram (1941 A.D.) to
start the year on the Gregorian January 1 and to map year zero to Gregorian year 543 B.C., shall be used.
See Also:
Aspose.Words Documentation - the home page for the Aspose.Words Product Documentation.
Aspose.Words Support Forum - our preferred method of support.