Not for current year.

These are universal rules.

calendarFirstDayOfWeek is usually 'Sunday' around here, but my paychecks are 
Saturday to Friday weeks.
And, some people use the convention of Monday being first day of the week.

This property comes up when dealing with date information involving numeric 
days of week information. I.e., the calendarPattern "e" specifier. But it also 
interacts with calendarDaysInFirstWeek below.

calendarDaysInFirstWeek is a threshold. Let's say your week begins on Sunday, 
so that's day 1 of a week.
Jan 1 falls on a wednesday some year let's say. So Wed, Thurs, Fri, Sat are 4 
days that are in the fraction of a week before the first Sunday. That's 4 days. 
 If calendarDaysInFirstWeek is 4 or less, then these first 4 days will be 
considered to be week 1 of the year. Week 2 will begin on Sunday. If 
calendarDaysInFirstWeek is 5, 6, or 7, then these first 4 days will be 
considered part of the final week of the prior year, and the 1st week of this 
year will be considered to begin on Sunday Jan 5.

Note that this whole calculation is relative to what day of the week you choose 
to be the first day of the week.


________________________________
From: Costello, Roger L. <coste...@mitre.org>
Sent: Friday, May 1, 2020 11:36 AM
To: users@daffodil.apache.org <users@daffodil.apache.org>
Subject: I don't understand the calendar properties!

Hi Folks,

When specifying that a data item has a calendar date/time value, you must 
specify, among others, these properties:

 - calendarFirstDayOfWeek
 - calendarDaysInFirstWeek

Huh?

Is that the first day of the week and the days in the first week for the 
current year (2020)? If so, my DFDL schema will break in 2021, right?

Or, is it the first day of the week and the days in the first week for the 
input value? If so, my DFDL schema will break when I change the input value, 
right?

I thought I understood the calendar properties, but now realize that I don't. 
Please help!

/Roger

Reply via email to