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_ja 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 "ja"
* See http://www.unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table
*/
public class _CalendarFormatter_ja extends CalendarFormatterBase {
public _CalendarFormatter_ja() {
this.locale = new CLDRLocale("ja", "", "", "");
this.firstDay = 1;
this.minDays = 1;
this.eras = new FieldVariants(
new String[] {"紀元前", "西暦"},
new String[] {"BC", "AD"},
new String[] {},
new String[] {"紀元前", "西暦"});
this.quartersFormat = new FieldVariants(
new String[] {"Q1", "Q2", "Q3", "Q4"},
new String[] {"1", "2", "3", "4"},
new String[] {},
new String[] {"第1四半期", "第2四半期", "第3四半期", "第4四半期"});
this.quartersStandalone = new FieldVariants(
new String[] {"Q1", "Q2", "Q3", "Q4"},
new String[] {"1", "2", "3", "4"},
new String[] {},
new String[] {"第1四半期", "第2四半期", "第3四半期", "第4四半期"});
this.monthsFormat = new FieldVariants(
new String[] {"1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"},
new String[] {"1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"},
new String[] {},
new String[] {"1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"});
this.monthsStandalone = new FieldVariants(
new String[] {"1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"},
new String[] {"1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"},
new String[] {},
new String[] {"1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"});
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[] {"午前", "午後"},
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: {
// "y/MM/dd"
formatField(d, b, 'y', 1);
b.append("/");
formatField(d, b, 'M', 2);
b.append("/");
formatField(d, b, 'd', 2);
break;
}
case MEDIUM: {
// "y/MM/dd"
formatField(d, b, 'y', 1);
b.append("/");
formatField(d, b, 'M', 2);
b.append("/");
formatField(d, b, 'd', 2);
break;
}
case LONG: {
// "y年M月d日"
formatField(d, b, 'y', 1);
b.append("年");
formatField(d, b, 'M', 1);
b.append("月");
formatField(d, b, 'd', 1);
b.append("日");
break;
}
case FULL: {
// "y年M月d日EEEE"
formatField(d, b, 'y', 1);
b.append("年");
formatField(d, b, 'M', 1);
b.append("月");
formatField(d, b, 'd', 1);
b.append("日");
formatField(d, b, 'E', 4);
break;
}
}
}
@Override
public void formatTime(FormatType type, ZonedDateTime d, StringBuilder b) {
switch (type) {
case SHORT: {
// "H:mm"
formatField(d, b, 'H', 1);
b.append(":");
formatField(d, b, 'm', 2);
break;
}
case MEDIUM: {
// "H:mm:ss"
formatField(d, b, 'H', 1);
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);
b.append("日");
break;
}
case "E": {
// Pattern: "ccc"
formatField(d, b, 'c', 3);
break;
}
case "Ed": {
// Pattern: "d日(E)"
formatField(d, b, 'd', 1);
b.append("日(");
formatField(d, b, 'E', 1);
b.append(")");
break;
}
case "EEEEd": {
// Pattern: "d日EEEE"
formatField(d, b, 'd', 1);
b.append("日");
formatField(d, b, 'E', 4);
break;
}
case "Ehm": {
// Pattern: "aK:mm (E)"
formatField(d, b, 'a', 1);
formatField(d, b, 'K', 1);
b.append(":");
formatField(d, b, 'm', 2);
b.append(" (");
formatField(d, b, 'E', 1);
b.append(")");
break;
}
case "EHm": {
// Pattern: "H:mm (E)"
formatField(d, b, 'H', 1);
b.append(":");
formatField(d, b, 'm', 2);
b.append(" (");
formatField(d, b, 'E', 1);
b.append(")");
break;
}
case "Ehms": {
// Pattern: "aK:mm:ss (E)"
formatField(d, b, 'a', 1);
formatField(d, b, 'K', 1);
b.append(":");
formatField(d, b, 'm', 2);
b.append(":");
formatField(d, b, 's', 2);
b.append(" (");
formatField(d, b, 'E', 1);
b.append(")");
break;
}
case "EHms": {
// Pattern: "H:mm:ss (E)"
formatField(d, b, 'H', 1);
b.append(":");
formatField(d, b, 'm', 2);
b.append(":");
formatField(d, b, 's', 2);
b.append(" (");
formatField(d, b, 'E', 1);
b.append(")");
break;
}
case "Gy": {
// Pattern: "Gy年"
formatField(d, b, 'G', 1);
formatField(d, b, 'y', 1);
b.append("年");
break;
}
case "GyMMM": {
// Pattern: "Gy年M月"
formatField(d, b, 'G', 1);
formatField(d, b, 'y', 1);
b.append("年");
formatField(d, b, 'M', 1);
b.append("月");
break;
}
case "GyMMMd": {
// Pattern: "Gy年M月d日"
formatField(d, b, 'G', 1);
formatField(d, b, 'y', 1);
b.append("年");
formatField(d, b, 'M', 1);
b.append("月");
formatField(d, b, 'd', 1);
b.append("日");
break;
}
case "GyMMMEd": {
// Pattern: "Gy年M月d日(E)"
formatField(d, b, 'G', 1);
formatField(d, b, 'y', 1);
b.append("年");
formatField(d, b, 'M', 1);
b.append("月");
formatField(d, b, 'd', 1);
b.append("日(");
formatField(d, b, 'E', 1);
b.append(")");
break;
}
case "GyMMMEEEEd": {
// Pattern: "Gy年M月d日EEEE"
formatField(d, b, 'G', 1);
formatField(d, b, 'y', 1);
b.append("年");
formatField(d, b, 'M', 1);
b.append("月");
formatField(d, b, 'd', 1);
b.append("日");
formatField(d, b, 'E', 4);
break;
}
case "h": {
// Pattern: "aK時"
formatField(d, b, 'a', 1);
formatField(d, b, 'K', 1);
b.append("時");
break;
}
case "H": {
// Pattern: "H時"
formatField(d, b, 'H', 1);
b.append("時");
break;
}
case "hm": {
// Pattern: "aK:mm"
formatField(d, b, 'a', 1);
formatField(d, b, 'K', 1);
b.append(":");
formatField(d, b, 'm', 2);
break;
}
case "Hm": {
// Pattern: "H:mm"
formatField(d, b, 'H', 1);
b.append(":");
formatField(d, b, 'm', 2);
break;
}
case "hms": {
// Pattern: "aK:mm:ss"
formatField(d, b, 'a', 1);
formatField(d, b, 'K', 1);
b.append(":");
formatField(d, b, 'm', 2);
b.append(":");
formatField(d, b, 's', 2);
break;
}
case "Hms": {
// Pattern: "H:mm:ss"
formatField(d, b, 'H', 1);
b.append(":");
formatField(d, b, 'm', 2);
b.append(":");
formatField(d, b, 's', 2);
break;
}
case "hmsv": {
// Pattern: "aK:mm:ss v"
formatField(d, b, 'a', 1);
formatField(d, b, 'K', 1);
b.append(":");
formatField(d, b, 'm', 2);
b.append(":");
formatField(d, b, 's', 2);
b.append(" ");
formatField(d, b, 'v', 1);
break;
}
case "Hmsv": {
// Pattern: "H:mm:ss 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, 'v', 1);
break;
}
case "hmv": {
// Pattern: "aK:mm v"
formatField(d, b, 'a', 1);
formatField(d, b, 'K', 1);
b.append(":");
formatField(d, b, 'm', 2);
b.append(" ");
formatField(d, b, 'v', 1);
break;
}
case "Hmv": {
// Pattern: "H:mm v"
formatField(d, b, 'H', 1);
b.append(":");
formatField(d, b, 'm', 2);
b.append(" ");
formatField(d, b, 'v', 1);
break;
}
case "M": {
// Pattern: "M月"
formatField(d, b, 'M', 1);
b.append("月");
break;
}
case "Md": {
// Pattern: "M/d"
formatField(d, b, 'M', 1);
b.append("/");
formatField(d, b, 'd', 1);
break;
}
case "MEd": {
// Pattern: "M/d(E)"
formatField(d, b, 'M', 1);
b.append("/");
formatField(d, b, 'd', 1);
b.append("(");
formatField(d, b, 'E', 1);
b.append(")");
break;
}
case "MEEEEd": {
// Pattern: "M/dEEEE"
formatField(d, b, 'M', 1);
b.append("/");
formatField(d, b, 'd', 1);
formatField(d, b, 'E', 4);
break;
}
case "MMM": {
// Pattern: "M月"
formatField(d, b, 'M', 1);
b.append("月");
break;
}
case "MMMd": {
// Pattern: "M月d日"
formatField(d, b, 'M', 1);
b.append("月");
formatField(d, b, 'd', 1);
b.append("日");
break;
}
case "MMMEd": {
// Pattern: "M月d日(E)"
formatField(d, b, 'M', 1);
b.append("月");
formatField(d, b, 'd', 1);
b.append("日(");
formatField(d, b, 'E', 1);
b.append(")");
break;
}
case "MMMEEEEd": {
// Pattern: "M月d日EEEE"
formatField(d, b, 'M', 1);
b.append("月");
formatField(d, b, 'd', 1);
b.append("日");
formatField(d, b, 'E', 4);
break;
}
case "MMMMd": {
// Pattern: "M月d日"
formatField(d, b, 'M', 1);
b.append("月");
formatField(d, b, 'd', 1);
b.append("日");
break;
}
case "MMMMW-count-other": {
// Pattern: "M月第W週"
formatField(d, b, 'M', 1);
b.append("月第");
formatField(d, b, 'W', 1);
b.append("週");
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);
b.append("年");
break;
}
case "yM": {
// Pattern: "y/M"
formatField(d, b, 'y', 1);
b.append("/");
formatField(d, b, 'M', 1);
break;
}
case "yMd": {
// Pattern: "y/M/d"
formatField(d, b, 'y', 1);
b.append("/");
formatField(d, b, 'M', 1);
b.append("/");
formatField(d, b, 'd', 1);
break;
}
case "yMEd": {
// Pattern: "y/M/d(E)"
formatField(d, b, 'y', 1);
b.append("/");
formatField(d, b, 'M', 1);
b.append("/");
formatField(d, b, 'd', 1);
b.append("(");
formatField(d, b, 'E', 1);
b.append(")");
break;
}
case "yMEEEEd": {
// Pattern: "y/M/dEEEE"
formatField(d, b, 'y', 1);
b.append("/");
formatField(d, b, 'M', 1);
b.append("/");
formatField(d, b, 'd', 1);
formatField(d, b, 'E', 4);
break;
}
case "yMM": {
// Pattern: "y/MM"
formatField(d, b, 'y', 1);
b.append("/");
formatField(d, b, 'M', 2);
break;
}
case "yMMM": {
// Pattern: "y年M月"
formatField(d, b, 'y', 1);
b.append("年");
formatField(d, b, 'M', 1);
b.append("月");
break;
}
case "yMMMd": {
// Pattern: "y年M月d日"
formatField(d, b, 'y', 1);
b.append("年");
formatField(d, b, 'M', 1);
b.append("月");
formatField(d, b, 'd', 1);
b.append("日");
break;
}
case "yMMMEd": {
// Pattern: "y年M月d日(E)"
formatField(d, b, 'y', 1);
b.append("年");
formatField(d, b, 'M', 1);
b.append("月");
formatField(d, b, 'd', 1);
b.append("日(");
formatField(d, b, 'E', 1);
b.append(")");
break;
}
case "yMMMEEEEd": {
// Pattern: "y年M月d日EEEE"
formatField(d, b, 'y', 1);
b.append("年");
formatField(d, b, 'M', 1);
b.append("月");
formatField(d, b, 'd', 1);
b.append("日");
formatField(d, b, 'E', 4);
break;
}
case "yMMMM": {
// Pattern: "y年M月"
formatField(d, b, 'y', 1);
b.append("年");
formatField(d, b, 'M', 1);
b.append("月");
break;
}
case "yQQQ": {
// Pattern: "y/QQQ"
formatField(d, b, 'y', 1);
b.append("/");
formatField(d, b, 'Q', 3);
break;
}
case "yQQQQ": {
// Pattern: "y年QQQQ"
formatField(d, b, 'y', 1);
b.append("年");
formatField(d, b, 'Q', 4);
break;
}
case "yw-count-other": {
// Pattern: "y年第w週"
formatField(d, b, 'y', 1);
b.append("年第");
formatField(d, b, 'w', 1);
b.append("週");
break;
}
default: {
return false;
}
}
return true;
}
}