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

Class Weekcycle

base/src/main/java/net/time4j/Weekcycle.java:49–144  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

47 * @since 3.21/4.17
48 */
49public final class Weekcycle
50 extends BasicUnit
51 implements IsoDateUnit, Serializable {
52
53 //~ Statische Felder/Initialisierungen --------------------------------
54
55 /**
56 * <p>Constant for week-based years which either have 364 or 371 days. </p>
57 */
58 /*[deutsch]
59 * <p>Konstante f&uuml;r wochenbasierte Jahre, die entweder 364 oder 371 Tage haben. </p>
60 */
61 public static final Weekcycle YEARS = new Weekcycle();
62
63 private static final long serialVersionUID = -4981215347844372171L;
64
65 //~ Konstruktoren -----------------------------------------------------
66
67 private Weekcycle() {
68 // singleton
69
70 }
71
72 //~ Methoden ----------------------------------------------------------
73
74 /**
75 * <p>Calculates the temporal distance between given calendar dates
76 * in this calendar unit. </p>
77 *
78 * @param start starting date
79 * @param end ending date
80 * @return duration as count of this unit
81 */
82 /*[deutsch]
83 * <p>Ermittelt den zeitlichen Abstand zwischen den angegebenen
84 * Datumsangaben gemessen in dieser Einheit. </p>
85 *
86 * @param start starting date
87 * @param end ending date
88 * @return duration as count of this unit
89 */
90 public long between(
91 PlainDate start,
92 PlainDate end
93 ) {
94
95 return this.derive(start).between(start, end);
96
97 }
98
99 @Override
100 public char getSymbol() {
101
102 return 'Y';
103
104 }
105
106 @Override

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected