RE: F&O - Is extract(month, myDateTimeItem) possible?

It would be possible, and it is an option that we considered, but we decided
against it. I don't think the reasons were absolutely compelling; it is hard
to argue a strong case for either solution over the other. (We also
considered a third solution, namely a single extract function that returns
all the components as a sequence).

Michael Kay

> -----Original Message-----
> From: Svgdeveloper@aol.com [mailto:Svgdeveloper@aol.com] 
> Sent: 02 May 2003 07:17
> To: public-qt-comments@w3.org
> Subject: F&O - Is extract(month, myDateTimeItem) possible?
> 
> 
> 
> I and a friend have been independently exploring the 
> date-time functions in 
> XPath 2.0 / XQuery 1.0. They are very tedious to hand code.
> 
> Looking at this from a coder's point of view, it would be 
> much nicer to have 
> something like,
> 
> extract(someDesiredDateComponent, someDateTimeItem)
> 
> rather than a mulitiplicity of
> get-somethingInteresting-from-gHorribleKludge() functions.
> 
> So, would it be possible to replace the panoply of component 
> extraction 
> functions with, for example,
> 
> extract(month, myItemName)
> 
> the first argument being all legal components (seconds, 
> minutes, timezone 
> etc) and the second argument being simply an item name (not 
> even requiring a 
> coder to master all the gHorribleKludge types), with the item 
> having to be a 
> date-time type?
> 
> So I guess I am asking several questions:
> 
> 1. Is there a good reason for having the multiplicity of 
> dateTime component 
> extraction functions as separate functions?
> 2. Is there a compelling technical reason why extract(month, 
> myDateTimeItem) 
> couldn't work or is perceived as technically inferior?
> 3. Depending on the answers to 1. and 2. is the WG willing to 
> consider a more 
> compact syntax requiring fewer date-time component extraction 
> functions?
> 
> I appreciate that we are now 5.5 months into the nominal "3 
> month" WD cycle, 
> so I guess a new batch of WDs will arrive soon, so even if 
> found worth 
> exploring I accept that any acceptance of the idea won't be 
> immediately 
> expressed in a WD.
> 
> I would be interested in the WG's comments.
> 
> Andrew Watt
> 

Received on Sunday, 4 May 2003 19:36:56 UTC