You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@daffodil.apache.org by "Costello, Roger L." <co...@mitre.org> on 2019/07/01 12:43:58 UTC

I don't understand dfdl:calendarFirstDayOfWeek and dfdl:calendarDaysInFirstWeek

Hello DFDL community,

The DFDL specification says this about dfdl:calendarFirstDayOfWeek

Valid values 'Monday' ... 'Sunday'
The day of the week upon which a new week is considered to start.

Huh?

I think a week starts on Monday. You think a week starts on Sunday. Who's right? Why does it matter? What does this have to do with parsing an input calendar value?

The DFDL specification says this about dfdl:calendarDaysInFirstWeek

Valid values 1 to 7
Specify the number of days of the new year that must fall within the first week.

Huh?

The number of days of which year? Any year? The year of the input data (how would I know that)?

Help, please!   /Roger

[cid:image001.png@01D52FE9.1F0EB280]

Re: I don't understand dfdl:calendarFirstDayOfWeek and dfdl:calendarDaysInFirstWeek

Posted by Steve Lawrence <sl...@apache.org>.
I believe this is needed for the "Week Date" [1] calendar system. In
this system, you don't specify a day by year/month/day, but instead by
year/week of year/day of week. So today is 2019-27-1 (First day of the
week, 27th week of the year). So you need to know which day of the week
is "first" in order to know the correct day of the week. In the ISO week
date the first day of a week is Monday, but other system could use
something different.

[1] ]https://en.wikipedia.org/wiki/ISO_week_date

On 7/1/19 8:43 AM, Costello, Roger L. wrote:
> Hello DFDL community,
> 
> The DFDL specification says this about dfdl:calendarFirstDayOfWeek
> 
> Valid values 'Monday' … 'Sunday'
> 
> The day of the week upon which a new week is considered to start.
> 
> Huh?
> 
> I think a week starts on Monday. You think a week starts on Sunday. Who’s right? 
> Why does it matter? What does this have to do with parsing an input calendar value?
> 
> The DFDL specification says this about dfdl:calendarDaysInFirstWeek
> 
> Valid values 1 to 7
> 
> Specify the number of days of the new year that must fall within the first week.
> 
> Huh?
> 
> The number of days of /which/ year? Any year? The year of the input data (how 
> would I know that)?
> 
> Help, please!   /Roger
>