Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
naotoj committed Sep 6, 2024
1 parent 5b72bbf commit 638f713
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 22 deletions.
38 changes: 19 additions & 19 deletions make/jdk/src/classes/build/tools/tzdb/TzdbZoneRulesProvider.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2014, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2014, 2024, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -365,31 +365,31 @@ int parseYear(String year, int defaultYear) {

Month parseMonth(String mon) {
switch (mon) {
case "Jan": return Month.JANUARY;
case "Feb": return Month.FEBRUARY;
case "Mar": return Month.MARCH;
case "Apr": return Month.APRIL;
case "Jan", "January": return Month.JANUARY;
case "Feb", "February": return Month.FEBRUARY;
case "Mar", "March": return Month.MARCH;
case "Apr", "April": return Month.APRIL;
case "May": return Month.MAY;
case "Jun": return Month.JUNE;
case "Jul": return Month.JULY;
case "Aug": return Month.AUGUST;
case "Sep": return Month.SEPTEMBER;
case "Oct": return Month.OCTOBER;
case "Nov": return Month.NOVEMBER;
case "Dec": return Month.DECEMBER;
case "Jun", "June": return Month.JUNE;
case "Jul", "July": return Month.JULY;
case "Aug", "August": return Month.AUGUST;
case "Sep", "September": return Month.SEPTEMBER;
case "Oct", "October": return Month.OCTOBER;
case "Nov", "November": return Month.NOVEMBER;
case "Dec", "December": return Month.DECEMBER;
}
throw new IllegalArgumentException("Unknown month: " + mon);
}

DayOfWeek parseDayOfWeek(String dow) {
switch (dow) {
case "Mon": return DayOfWeek.MONDAY;
case "Tue": return DayOfWeek.TUESDAY;
case "Wed": return DayOfWeek.WEDNESDAY;
case "Thu": return DayOfWeek.THURSDAY;
case "Fri": return DayOfWeek.FRIDAY;
case "Sat": return DayOfWeek.SATURDAY;
case "Sun": return DayOfWeek.SUNDAY;
case "Mon", "Monday": return DayOfWeek.MONDAY;
case "Tue", "Tuesday": return DayOfWeek.TUESDAY;
case "Wed", "Wednesday": return DayOfWeek.WEDNESDAY;
case "Thu", "Thursday": return DayOfWeek.THURSDAY;
case "Fri", "Friday": return DayOfWeek.FRIDAY;
case "Sat", "Saturday": return DayOfWeek.SATURDAY;
case "Sun", "Sunday": return DayOfWeek.SUNDAY;
}
throw new IllegalArgumentException("Unknown day-of-week: " + dow);
}
Expand Down
6 changes: 3 additions & 3 deletions src/java.base/share/data/tzdata/asia
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,7 @@ Rule Shang 1919 only - Sep 30 24:00 0 S
Rule Shang 1940 only - Jun 1 0:00 1:00 D
Rule Shang 1940 only - Oct 12 24:00 0 S
Rule Shang 1941 only - Mar 15 0:00 1:00 D
Rule Shang 1941 only - Nov 1 24:00 0 S
Rule Shang 1941 only - November 1 24:00 0 S
Rule Shang 1942 only - Jan 31 0:00 1:00 D
Rule Shang 1945 only - Sep 1 24:00 0 S
Rule Shang 1946 only - May 15 0:00 1:00 D
Expand Down Expand Up @@ -469,7 +469,7 @@ Rule Shang 1948 1949 - Sep 30 24:00 0 S #plan

# Rule NAME FROM TO - IN ON AT SAVE LETTER/S
Rule PRC 1986 only - May 4 2:00 1:00 D
Rule PRC 1986 1991 - Sep Sun>=11 2:00 0 S
Rule PRC 1986 1991 - Sep Sunday>=11 2:00 0 S
Rule PRC 1987 1991 - Apr Sun>=11 2:00 1:00 D

# From Anthony Fok (2001-12-20):
Expand Down Expand Up @@ -1116,7 +1116,7 @@ Rule Macau 1947 only - Nov 30 23:00s 0 S
Rule Macau 1948 only - May 2 23:00s 1:00 D
Rule Macau 1948 only - Oct 31 23:00s 0 S
Rule Macau 1949 1950 - Apr Sat>=1 23:00s 1:00 D
Rule Macau 1949 1950 - Oct lastSat 23:00s 0 S
Rule Macau 1949 1950 - Oct lastSaturday 23:00s 0 S
Rule Macau 1951 only - Mar 31 23:00s 1:00 D
Rule Macau 1951 only - Oct 28 23:00s 0 S
Rule Macau 1952 1953 - Apr Sat>=1 23:00s 1:00 D
Expand Down

0 comments on commit 638f713

Please sign in to comment.