weekOfYear property

int get weekOfYear

Returns a raw week-of-year value used internally.

Warning: this value can be 0 for dates in early January that belong to the last ISO week of the previous year, or 53 for dates in late December that belong to week 1 of the next year. Use weekNumber for fully ISO 8601-compliant results.

Implementation

int get weekOfYear => ((dayOfYear - weekday + 10) / 7).floor();