MCPcopy Create free account
hub / github.com/MenoData/Time4J / parseWeekBasedSymbol

Method parseWeekBasedSymbol

base/src/main/java/net/time4j/Duration.java:3831–3849  ·  view source on GitHub ↗
(
        char c,
        String period,
        int index
    )

Source from the content-addressed store, hash-verified

3829 }
3830
3831 private static IsoDateUnit parseWeekBasedSymbol(
3832 char c,
3833 String period,
3834 int index
3835 ) throws ParseException {
3836
3837 switch (c) {
3838 case 'Y':
3839 return CalendarUnit.weekBasedYears();
3840 case 'W':
3841 return WEEKS;
3842 case 'D':
3843 return DAYS;
3844 default:
3845 throw new ParseException(
3846 "Symbol \'" + c + "\' not supported: " + period, index);
3847 }
3848
3849 }
3850
3851 private static <U extends ChronoUnit> ChronoUnit addParsedItem(
3852 ChronoUnit unit,

Callers 1

parseMethod · 0.95

Calls 1

weekBasedYearsMethod · 0.95

Tested by

no test coverage detected