mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 07:14:30 +02:00
8279185: Support for IsoFields in JapaneseDate/MinguoDate/ThaiBuddhistDate
Reviewed-by: joehw, rriggs
This commit is contained in:
parent
ac274c4ca6
commit
ef7a9f8170
13 changed files with 272 additions and 38 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2012, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2012, 2022, 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
|
||||
|
@ -465,13 +465,13 @@ public final class JapaneseDate
|
|||
|
||||
@Override
|
||||
public long getLong(TemporalField field) {
|
||||
if (field instanceof ChronoField) {
|
||||
if (field instanceof ChronoField cf) {
|
||||
// same as ISO:
|
||||
// DAY_OF_WEEK, DAY_OF_MONTH, EPOCH_DAY, MONTH_OF_YEAR, PROLEPTIC_MONTH, YEAR
|
||||
//
|
||||
// calendar specific fields
|
||||
// DAY_OF_YEAR, YEAR_OF_ERA, ERA
|
||||
switch ((ChronoField) field) {
|
||||
switch (cf) {
|
||||
case ALIGNED_DAY_OF_WEEK_IN_MONTH:
|
||||
case ALIGNED_DAY_OF_WEEK_IN_YEAR:
|
||||
case ALIGNED_WEEK_OF_MONTH:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue