diff --git a/src/java.base/share/classes/java/time/temporal/WeekFields.java b/src/java.base/share/classes/java/time/temporal/WeekFields.java index 458ca34c7b5..9b687017a36 100644 --- a/src/java.base/share/classes/java/time/temporal/WeekFields.java +++ b/src/java.base/share/classes/java/time/temporal/WeekFields.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2023, 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 @@ -294,6 +294,14 @@ public final class WeekFields implements Serializable { * those extensions. If both "fw" and "rg" are specified, the value from * the "fw" extension supersedes the implicit one from the "rg" extension. * + *
For example, users who are interested in using an English locale, + * but want the first day of the week that corresponds with the ISO-8601 + * standard can call + * {@snippet lang=java : + * Locale enIsoLoc = Locale.forLanguageTag("en-u-fw-mon"); + * WeekFields.of(enIsoLoc).getFirstDayOfWeek(); // returns MONDAY + * } + * * @param locale the locale to use, not null * @return the week-definition, not null */