Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
com.squarespace.cldr.dates._CalendarFormatter_th Maven / Gradle / Ivy
//
//
// AUTO-GENERATED CLASS - DO NOT EDIT
//
//
package com.squarespace.cldr.dates;
import com.squarespace.cldr.CLDRLocale;
import java.lang.Override;
import java.lang.String;
import java.lang.StringBuilder;
import java.time.ZonedDateTime;
/**
* Locale "th"
* See http://www.unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table
*/
public class _CalendarFormatter_th extends CalendarFormatterBase {
public _CalendarFormatter_th() {
this.locale = new CLDRLocale("th", "", "", "");
this.firstDay = 1;
this.minDays = 1;
this.eras = new FieldVariants(
new String[] {"ปีก่อน ค.ศ.", "ค.ศ."},
new String[] {"ก่อน ค.ศ.", "ค.ศ."},
new String[] {},
new String[] {"ปีก่อนคริสต์ศักราช", "คริสต์ศักราช"});
this.quartersFormat = new FieldVariants(
new String[] {"ไตรมาส 1", "ไตรมาส 2", "ไตรมาส 3", "ไตรมาส 4"},
new String[] {"1", "2", "3", "4"},
new String[] {},
new String[] {"ไตรมาส 1", "ไตรมาส 2", "ไตรมาส 3", "ไตรมาส 4"});
this.quartersStandalone = new FieldVariants(
new String[] {"ไตรมาส 1", "ไตรมาส 2", "ไตรมาส 3", "ไตรมาส 4"},
new String[] {"1", "2", "3", "4"},
new String[] {},
new String[] {"ไตรมาส 1", "ไตรมาส 2", "ไตรมาส 3", "ไตรมาส 4"});
this.monthsFormat = new FieldVariants(
new String[] {"ม.ค.", "ก.พ.", "มี.ค.", "เม.ย.", "พ.ค.", "มิ.ย.", "ก.ค.", "ส.ค.", "ก.ย.", "ต.ค.", "พ.ย.", "ธ.ค."},
new String[] {"ม.ค.", "ก.พ.", "มี.ค.", "เม.ย.", "พ.ค.", "มิ.ย.", "ก.ค.", "ส.ค.", "ก.ย.", "ต.ค.", "พ.ย.", "ธ.ค."},
new String[] {},
new String[] {"มกราคม", "กุมภาพันธ์", "มีนาคม", "เมษายน", "พฤษภาคม", "มิถุนายน", "กรกฎาคม", "สิงหาคม", "กันยายน", "ตุลาคม", "พฤศจิกายน", "ธันวาคม"});
this.monthsStandalone = new FieldVariants(
new String[] {"ม.ค.", "ก.พ.", "มี.ค.", "เม.ย.", "พ.ค.", "มิ.ย.", "ก.ค.", "ส.ค.", "ก.ย.", "ต.ค.", "พ.ย.", "ธ.ค."},
new String[] {"ม.ค.", "ก.พ.", "มี.ค.", "เม.ย.", "พ.ค.", "มิ.ย.", "ก.ค.", "ส.ค.", "ก.ย.", "ต.ค.", "พ.ย.", "ธ.ค."},
new String[] {},
new String[] {"มกราคม", "กุมภาพันธ์", "มีนาคม", "เมษายน", "พฤษภาคม", "มิถุนายน", "กรกฎาคม", "สิงหาคม", "กันยายน", "ตุลาคม", "พฤศจิกายน", "ธันวาคม"});
this.weekdaysFormat = new FieldVariants(
new String[] {"อา.", "จ.", "อ.", "พ.", "พฤ.", "ศ.", "ส."},
new String[] {"อา", "จ", "อ", "พ", "พฤ", "ศ", "ส"},
new String[] {"อา.", "จ.", "อ.", "พ.", "พฤ.", "ศ.", "ส."},
new String[] {"วันอาทิตย์", "วันจันทร์", "วันอังคาร", "วันพุธ", "วันพฤหัสบดี", "วันศุกร์", "วันเสาร์"});
this.weekdaysStandalone = new FieldVariants(
new String[] {"อา.", "จ.", "อ.", "พ.", "พฤ.", "ศ.", "ส."},
new String[] {"อา", "จ", "อ", "พ", "พฤ", "ศ", "ส"},
new String[] {"อา.", "จ.", "อ.", "พ.", "พฤ.", "ศ.", "ส."},
new String[] {"วันอาทิตย์", "วันจันทร์", "วันอังคาร", "วันพุธ", "วันพฤหัสบดี", "วันศุกร์", "วันเสาร์"});
this.dayPeriodsFormat = new FieldVariants(
new String[] {"ก่อนเที่ยง", "หลังเที่ยง"},
new String[] {"a", "p"},
new String[] {},
new String[] {"ก่อนเที่ยง", "หลังเที่ยง"});
this.dayPeriodsStandalone = new FieldVariants(
new String[] {"ก่อนเที่ยง", "หลังเที่ยง"},
new String[] {"ก่อนเที่ยง", "หลังเที่ยง"},
new String[] {},
new String[] {"ก่อนเที่ยง", "หลังเที่ยง"});
}
@Override
public void formatDate(FormatType type, ZonedDateTime d, StringBuilder b) {
switch (type) {
case SHORT: {
// "d/M/yy"
formatField(d, b, 'd', 1);
b.append("/");
formatField(d, b, 'M', 1);
b.append("/");
formatField(d, b, 'y', 2);
break;
}
case MEDIUM: {
// "d MMM y"
formatField(d, b, 'd', 1);
b.append(" ");
formatField(d, b, 'M', 3);
b.append(" ");
formatField(d, b, 'y', 1);
break;
}
case LONG: {
// "d MMMM G y"
formatField(d, b, 'd', 1);
b.append(" ");
formatField(d, b, 'M', 4);
b.append(" ");
formatField(d, b, 'G', 1);
b.append(" ");
formatField(d, b, 'y', 1);
break;
}
case FULL: {
// "EEEEที่ d MMMM G y"
formatField(d, b, 'E', 4);
b.append("ที่ ");
formatField(d, b, 'd', 1);
b.append(" ");
formatField(d, b, 'M', 4);
b.append(" ");
formatField(d, b, 'G', 1);
b.append(" ");
formatField(d, b, 'y', 1);
break;
}
}
}
@Override
public void formatTime(FormatType type, ZonedDateTime d, StringBuilder b) {
switch (type) {
case SHORT: {
// "HH:mm"
formatField(d, b, 'H', 2);
b.append(":");
formatField(d, b, 'm', 2);
break;
}
case MEDIUM: {
// "HH:mm:ss"
formatField(d, b, 'H', 2);
b.append(":");
formatField(d, b, 'm', 2);
b.append(":");
formatField(d, b, 's', 2);
break;
}
case LONG: {
// "H นาฬิกา mm นาที ss วินาที z"
formatField(d, b, 'H', 1);
b.append(" นาฬิกา ");
formatField(d, b, 'm', 2);
b.append(" นาที ");
formatField(d, b, 's', 2);
b.append(" วินาที ");
formatField(d, b, 'z', 1);
break;
}
case FULL: {
// "H นาฬิกา mm นาที ss วินาที zzzz"
formatField(d, b, 'H', 1);
b.append(" นาฬิกา ");
formatField(d, b, 'm', 2);
b.append(" นาที ");
formatField(d, b, 's', 2);
b.append(" วินาที ");
formatField(d, b, 'z', 4);
break;
}
}
}
@Override
public void formatWrapped(FormatType wrapperType, FormatType dateType, FormatType timeType,
String dateSkel, String timeSkel, ZonedDateTime d, StringBuilder b) {
switch (wrapperType) {
case SHORT:
case MEDIUM:
case LONG:
case FULL:
{
// "{1} {0}"
if (dateType != null) {
formatDate(dateType, d, b);
} else {
formatSkeleton(dateSkel, d, b);
}
b.append(" ");
if (timeType != null) {
formatTime(timeType, d, b);
} else {
formatSkeleton(timeSkel, d, b);
}
break;
}
}
}
@Override
public boolean formatSkeleton(String skeleton, ZonedDateTime d, StringBuilder b) {
switch (skeleton) {
case "d": {
// Pattern: "d"
formatField(d, b, 'd', 1);
break;
}
case "E": {
// Pattern: "ccc"
formatField(d, b, 'c', 3);
break;
}
case "Ed": {
// Pattern: "E d"
formatField(d, b, 'E', 1);
b.append(" ");
formatField(d, b, 'd', 1);
break;
}
case "Ehm": {
// Pattern: "E h:mm a"
formatField(d, b, 'E', 1);
b.append(" ");
formatField(d, b, 'h', 1);
b.append(":");
formatField(d, b, 'm', 2);
b.append(" ");
formatField(d, b, 'a', 1);
break;
}
case "EHm": {
// Pattern: "E HH:mm น."
formatField(d, b, 'E', 1);
b.append(" ");
formatField(d, b, 'H', 2);
b.append(":");
formatField(d, b, 'm', 2);
b.append(" น.");
break;
}
case "Ehms": {
// Pattern: "E h:mm:ss a"
formatField(d, b, 'E', 1);
b.append(" ");
formatField(d, b, 'h', 1);
b.append(":");
formatField(d, b, 'm', 2);
b.append(":");
formatField(d, b, 's', 2);
b.append(" ");
formatField(d, b, 'a', 1);
break;
}
case "EHms": {
// Pattern: "E HH:mm:ss"
formatField(d, b, 'E', 1);
b.append(" ");
formatField(d, b, 'H', 2);
b.append(":");
formatField(d, b, 'm', 2);
b.append(":");
formatField(d, b, 's', 2);
break;
}
case "Gy": {
// Pattern: "G y"
formatField(d, b, 'G', 1);
b.append(" ");
formatField(d, b, 'y', 1);
break;
}
case "GyMMM": {
// Pattern: "MMM G y"
formatField(d, b, 'M', 3);
b.append(" ");
formatField(d, b, 'G', 1);
b.append(" ");
formatField(d, b, 'y', 1);
break;
}
case "GyMMMd": {
// Pattern: "d MMM G y"
formatField(d, b, 'd', 1);
b.append(" ");
formatField(d, b, 'M', 3);
b.append(" ");
formatField(d, b, 'G', 1);
b.append(" ");
formatField(d, b, 'y', 1);
break;
}
case "GyMMMEd": {
// Pattern: "E d MMM G y"
formatField(d, b, 'E', 1);
b.append(" ");
formatField(d, b, 'd', 1);
b.append(" ");
formatField(d, b, 'M', 3);
b.append(" ");
formatField(d, b, 'G', 1);
b.append(" ");
formatField(d, b, 'y', 1);
break;
}
case "GyMMMEEEEd": {
// Pattern: "EEEEที่ d MMM G y"
formatField(d, b, 'E', 4);
b.append("ที่ ");
formatField(d, b, 'd', 1);
b.append(" ");
formatField(d, b, 'M', 3);
b.append(" ");
formatField(d, b, 'G', 1);
b.append(" ");
formatField(d, b, 'y', 1);
break;
}
case "h": {
// Pattern: "h a"
formatField(d, b, 'h', 1);
b.append(" ");
formatField(d, b, 'a', 1);
break;
}
case "H": {
// Pattern: "HH"
formatField(d, b, 'H', 2);
break;
}
case "hm": {
// Pattern: "h:mm a"
formatField(d, b, 'h', 1);
b.append(":");
formatField(d, b, 'm', 2);
b.append(" ");
formatField(d, b, 'a', 1);
break;
}
case "Hm": {
// Pattern: "HH:mm น."
formatField(d, b, 'H', 2);
b.append(":");
formatField(d, b, 'm', 2);
b.append(" น.");
break;
}
case "hms": {
// Pattern: "h:mm:ss a"
formatField(d, b, 'h', 1);
b.append(":");
formatField(d, b, 'm', 2);
b.append(":");
formatField(d, b, 's', 2);
b.append(" ");
formatField(d, b, 'a', 1);
break;
}
case "Hms": {
// Pattern: "HH:mm:ss"
formatField(d, b, 'H', 2);
b.append(":");
formatField(d, b, 'm', 2);
b.append(":");
formatField(d, b, 's', 2);
break;
}
case "hmsv": {
// Pattern: "h:mm:ss a v"
formatField(d, b, 'h', 1);
b.append(":");
formatField(d, b, 'm', 2);
b.append(":");
formatField(d, b, 's', 2);
b.append(" ");
formatField(d, b, 'a', 1);
b.append(" ");
formatField(d, b, 'v', 1);
break;
}
case "Hmsv": {
// Pattern: "HH:mm:ss v"
formatField(d, b, 'H', 2);
b.append(":");
formatField(d, b, 'm', 2);
b.append(":");
formatField(d, b, 's', 2);
b.append(" ");
formatField(d, b, 'v', 1);
break;
}
case "hmv": {
// Pattern: "h:mm a v"
formatField(d, b, 'h', 1);
b.append(":");
formatField(d, b, 'm', 2);
b.append(" ");
formatField(d, b, 'a', 1);
b.append(" ");
formatField(d, b, 'v', 1);
break;
}
case "Hmv": {
// Pattern: "HH:mm v"
formatField(d, b, 'H', 2);
b.append(":");
formatField(d, b, 'm', 2);
b.append(" ");
formatField(d, b, 'v', 1);
break;
}
case "M": {
// Pattern: "L"
formatField(d, b, 'L', 1);
break;
}
case "Md": {
// Pattern: "d/M"
formatField(d, b, 'd', 1);
b.append("/");
formatField(d, b, 'M', 1);
break;
}
case "MEd": {
// Pattern: "E d/M"
formatField(d, b, 'E', 1);
b.append(" ");
formatField(d, b, 'd', 1);
b.append("/");
formatField(d, b, 'M', 1);
break;
}
case "MMM": {
// Pattern: "LLL"
formatField(d, b, 'L', 3);
break;
}
case "MMMd": {
// Pattern: "d MMM"
formatField(d, b, 'd', 1);
b.append(" ");
formatField(d, b, 'M', 3);
break;
}
case "MMMEd": {
// Pattern: "E d MMM"
formatField(d, b, 'E', 1);
b.append(" ");
formatField(d, b, 'd', 1);
b.append(" ");
formatField(d, b, 'M', 3);
break;
}
case "MMMEEEEd": {
// Pattern: "EEEEที่ d MMM"
formatField(d, b, 'E', 4);
b.append("ที่ ");
formatField(d, b, 'd', 1);
b.append(" ");
formatField(d, b, 'M', 3);
break;
}
case "MMMMd": {
// Pattern: "d MMMM"
formatField(d, b, 'd', 1);
b.append(" ");
formatField(d, b, 'M', 4);
break;
}
case "MMMMEd": {
// Pattern: "E d MMMM"
formatField(d, b, 'E', 1);
b.append(" ");
formatField(d, b, 'd', 1);
b.append(" ");
formatField(d, b, 'M', 4);
break;
}
case "MMMMEEEEd": {
// Pattern: "EEEEที่ d MMMM"
formatField(d, b, 'E', 4);
b.append("ที่ ");
formatField(d, b, 'd', 1);
b.append(" ");
formatField(d, b, 'M', 4);
break;
}
case "MMMMW-count-other": {
// Pattern: "สัปดาห์ที่ W ของ MMM"
b.append("สัปดาห์ที่ ");
formatField(d, b, 'W', 1);
b.append(" ของ ");
formatField(d, b, 'M', 3);
break;
}
case "mmss": {
// Pattern: "mm:ss"
formatField(d, b, 'm', 2);
b.append(":");
formatField(d, b, 's', 2);
break;
}
case "ms": {
// Pattern: "mm:ss"
formatField(d, b, 'm', 2);
b.append(":");
formatField(d, b, 's', 2);
break;
}
case "y": {
// Pattern: "y"
formatField(d, b, 'y', 1);
break;
}
case "yM": {
// Pattern: "M/y"
formatField(d, b, 'M', 1);
b.append("/");
formatField(d, b, 'y', 1);
break;
}
case "yMd": {
// Pattern: "d/M/y"
formatField(d, b, 'd', 1);
b.append("/");
formatField(d, b, 'M', 1);
b.append("/");
formatField(d, b, 'y', 1);
break;
}
case "yMEd": {
// Pattern: "E d/M/y"
formatField(d, b, 'E', 1);
b.append(" ");
formatField(d, b, 'd', 1);
b.append("/");
formatField(d, b, 'M', 1);
b.append("/");
formatField(d, b, 'y', 1);
break;
}
case "yMMM": {
// Pattern: "MMM y"
formatField(d, b, 'M', 3);
b.append(" ");
formatField(d, b, 'y', 1);
break;
}
case "yMMMd": {
// Pattern: "d MMM y"
formatField(d, b, 'd', 1);
b.append(" ");
formatField(d, b, 'M', 3);
b.append(" ");
formatField(d, b, 'y', 1);
break;
}
case "yMMMEd": {
// Pattern: "E d MMM y"
formatField(d, b, 'E', 1);
b.append(" ");
formatField(d, b, 'd', 1);
b.append(" ");
formatField(d, b, 'M', 3);
b.append(" ");
formatField(d, b, 'y', 1);
break;
}
case "yMMMEEEEd": {
// Pattern: "EEEEที่ d MMM y"
formatField(d, b, 'E', 4);
b.append("ที่ ");
formatField(d, b, 'd', 1);
b.append(" ");
formatField(d, b, 'M', 3);
b.append(" ");
formatField(d, b, 'y', 1);
break;
}
case "yMMMM": {
// Pattern: "MMMM G y"
formatField(d, b, 'M', 4);
b.append(" ");
formatField(d, b, 'G', 1);
b.append(" ");
formatField(d, b, 'y', 1);
break;
}
case "yMMMMd": {
// Pattern: "d MMMM G y"
formatField(d, b, 'd', 1);
b.append(" ");
formatField(d, b, 'M', 4);
b.append(" ");
formatField(d, b, 'G', 1);
b.append(" ");
formatField(d, b, 'y', 1);
break;
}
case "yMMMMEd": {
// Pattern: "E d MMMM G y"
formatField(d, b, 'E', 1);
b.append(" ");
formatField(d, b, 'd', 1);
b.append(" ");
formatField(d, b, 'M', 4);
b.append(" ");
formatField(d, b, 'G', 1);
b.append(" ");
formatField(d, b, 'y', 1);
break;
}
case "yMMMMEEEEd": {
// Pattern: "EEEEที่ d MMMM G y"
formatField(d, b, 'E', 4);
b.append("ที่ ");
formatField(d, b, 'd', 1);
b.append(" ");
formatField(d, b, 'M', 4);
b.append(" ");
formatField(d, b, 'G', 1);
b.append(" ");
formatField(d, b, 'y', 1);
break;
}
case "yQQQ": {
// Pattern: "QQQ y"
formatField(d, b, 'Q', 3);
b.append(" ");
formatField(d, b, 'y', 1);
break;
}
case "yQQQQ": {
// Pattern: "QQQQ G y"
formatField(d, b, 'Q', 4);
b.append(" ");
formatField(d, b, 'G', 1);
b.append(" ");
formatField(d, b, 'y', 1);
break;
}
case "yw-count-other": {
// Pattern: "สัปดาห์ที่ w ของ y"
b.append("สัปดาห์ที่ ");
formatField(d, b, 'w', 1);
b.append(" ของ ");
formatField(d, b, 'y', 1);
break;
}
default: {
return false;
}
}
return true;
}
}