<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Converting Java Dates to Xml Schema dateTime, with timezone</title>
	<atom:link href="http://www.objectdefinitions.com/odblog/2007/converting-java-dates-to-xml-schema-datetime-with-timezone/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.objectdefinitions.com/odblog/2007/converting-java-dates-to-xml-schema-datetime-with-timezone/</link>
	<description>Software Development - random theories, code snippits and opinions</description>
	<lastBuildDate>Thu, 19 Aug 2010 14:40:56 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Nick</title>
		<link>http://www.objectdefinitions.com/odblog/2007/converting-java-dates-to-xml-schema-datetime-with-timezone/comment-page-1/#comment-1657</link>
		<dc:creator>Nick</dc:creator>
		<pubDate>Mon, 24 Nov 2008 14:17:56 +0000</pubDate>
		<guid isPermaLink="false">http://www.objectdefinitions.com/odblog/2007/converting-java-dates-to-xml-schema-datetime-with-timezone/#comment-1657</guid>
		<description>Ha ha, it just goes to prove I can&#039;t write anything in this blog without someone proving me wrong. Having said that I still find it unintuitive that January is month zero rather than month one in the Calendar API. 

However can you send me more details of the Arabic calendar with 11 months, I&#039;m interested to learn more? According to the wikipedia page the arabic/islamic calendar seems to also have 12 months. http://en.wikipedia.org/wiki/Arabic_calendar

Perhaps this is not the calendar you are referring to. In any case, the point is a good one - I suppose there may well be other calendars in which there are not exactly 12 months, which one might want to represent.

However design of the Calendar class is a bit confusing again here. The references to &#039;January&#039; in the javadocs for the MONTH field, and the existence of a JANUARY constant (as well as constants for the other Gregorian calendar months) does makes the abstract Calendar class appear to be aimed at the Gregorian Calendar primarily. If it is supposed to be non-calendar-specific then perhaps all Gregorian calendar concepts should have been pushed down into the Gregorian Calendar subclass. From the class docs it does seem as if the intention is that the Calendar class can be subclassed to add support for other calendar types - but then having Gregorian specific concepts in the superclass is misleading.</description>
		<content:encoded><![CDATA[<p>Ha ha, it just goes to prove I can&#8217;t write anything in this blog without someone proving me wrong. Having said that I still find it unintuitive that January is month zero rather than month one in the Calendar API. </p>
<p>However can you send me more details of the Arabic calendar with 11 months, I&#8217;m interested to learn more? According to the wikipedia page the arabic/islamic calendar seems to also have 12 months. <a href="http://en.wikipedia.org/wiki/Arabic_calendar" rel="nofollow">http://en.wikipedia.org/wiki/Arabic_calendar</a></p>
<p>Perhaps this is not the calendar you are referring to. In any case, the point is a good one &#8211; I suppose there may well be other calendars in which there are not exactly 12 months, which one might want to represent.</p>
<p>However design of the Calendar class is a bit confusing again here. The references to &#8216;January&#8217; in the javadocs for the MONTH field, and the existence of a JANUARY constant (as well as constants for the other Gregorian calendar months) does makes the abstract Calendar class appear to be aimed at the Gregorian Calendar primarily. If it is supposed to be non-calendar-specific then perhaps all Gregorian calendar concepts should have been pushed down into the Gregorian Calendar subclass. From the class docs it does seem as if the intention is that the Calendar class can be subclassed to add support for other calendar types &#8211; but then having Gregorian specific concepts in the superclass is misleading.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ahmet</title>
		<link>http://www.objectdefinitions.com/odblog/2007/converting-java-dates-to-xml-schema-datetime-with-timezone/comment-page-1/#comment-1654</link>
		<dc:creator>ahmet</dc:creator>
		<pubDate>Mon, 24 Nov 2008 13:39:47 +0000</pubDate>
		<guid isPermaLink="false">http://www.objectdefinitions.com/odblog/2007/converting-java-dates-to-xml-schema-datetime-with-timezone/#comment-1654</guid>
		<description>&quot;How many times in your recent memory has the number of months in a year varied?&quot;

Arabic calendar has 11 months in a year</description>
		<content:encoded><![CDATA[<p>&#8220;How many times in your recent memory has the number of months in a year varied?&#8221;</p>
<p>Arabic calendar has 11 months in a year</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nick</title>
		<link>http://www.objectdefinitions.com/odblog/2007/converting-java-dates-to-xml-schema-datetime-with-timezone/comment-page-1/#comment-1036</link>
		<dc:creator>Nick</dc:creator>
		<pubDate>Fri, 03 Oct 2008 10:01:59 +0000</pubDate>
		<guid isPermaLink="false">http://www.objectdefinitions.com/odblog/2007/converting-java-dates-to-xml-schema-datetime-with-timezone/#comment-1036</guid>
		<description>That&#039;s quite true and a good point. The class should make it clearer that that it only supports parsing date values in its &#039;expected format&#039; - which is the format it uses itself when it generates xml. So that means it is cannot be used as part of a general xml parser, which does limit its usefulness. But it wasn&#039;t written to solve that problem, I think I only added the parse method to help with some testing. It is really only intended to help with formatting Dates to xml Strings - a one way conversion. 

Your comment was helpful and the original code was a bit misleading, so I will tidy it up to make it clearer that it can&#039;t be used to parse xml dates in general.</description>
		<content:encoded><![CDATA[<p>That&#8217;s quite true and a good point. The class should make it clearer that that it only supports parsing date values in its &#8216;expected format&#8217; &#8211; which is the format it uses itself when it generates xml. So that means it is cannot be used as part of a general xml parser, which does limit its usefulness. But it wasn&#8217;t written to solve that problem, I think I only added the parse method to help with some testing. It is really only intended to help with formatting Dates to xml Strings &#8211; a one way conversion. </p>
<p>Your comment was helpful and the original code was a bit misleading, so I will tidy it up to make it clearer that it can&#8217;t be used to parse xml dates in general.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: anonymous</title>
		<link>http://www.objectdefinitions.com/odblog/2007/converting-java-dates-to-xml-schema-datetime-with-timezone/comment-page-1/#comment-1032</link>
		<dc:creator>anonymous</dc:creator>
		<pubDate>Thu, 02 Oct 2008 20:58:16 +0000</pubDate>
		<guid isPermaLink="false">http://www.objectdefinitions.com/odblog/2007/converting-java-dates-to-xml-schema-datetime-with-timezone/#comment-1032</guid>
		<description>The lexical space of dateTime consists of finite-length sequences of characters of the form: &#039;-&#039;? yyyy &#039;-&#039; mm &#039;-&#039; dd &#039;T&#039; hh &#039;:&#039; mm &#039;:&#039; ss (&#039;.&#039; s+)? (zzzzzz)?

(refer to http://www.w3.org/TR/xmlschema-2/#dateTime)

Your if ( xmlDateTime.length() != 25 ) line breaks that.</description>
		<content:encoded><![CDATA[<p>The lexical space of dateTime consists of finite-length sequences of characters of the form: &#8216;-&#8217;? yyyy &#8216;-&#8217; mm &#8216;-&#8217; dd &#8216;T&#8217; hh &#8216;:&#8217; mm &#8216;:&#8217; ss (&#8216;.&#8217; s+)? (zzzzzz)?</p>
<p>(refer to <a href="http://www.w3.org/TR/xmlschema-2/#dateTime)" rel="nofollow">http://www.w3.org/TR/xmlschema-2/#dateTime)</a></p>
<p>Your if ( xmlDateTime.length() != 25 ) line breaks that.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
