<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to DateTimeCalendarInternalStorage</title><link>https://sourceforge.net/p/threeten/oldwiki/DateTimeCalendarInternalStorage/</link><description>Recent changes to DateTimeCalendarInternalStorage</description><atom:link href="https://sourceforge.net/p/threeten/oldwiki/DateTimeCalendarInternalStorage/feed" rel="self"/><language>en</language><lastBuildDate>Thu, 22 May 2014 22:08:04 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/threeten/oldwiki/DateTimeCalendarInternalStorage/feed" rel="self" type="application/rss+xml"/><item><title>DateTimeCalendarInternalStorage modified by Stephen Colebourne</title><link>https://sourceforge.net/p/threeten/oldwiki/DateTimeCalendarInternalStorage/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;This choice is about how to store data inside calendars. &lt;/p&gt;
&lt;h2 id="option-1-year-month-day-hour-min-sec"&gt;Option 1 - year / month / day / hour / min / sec&lt;/h2&gt;
&lt;p&gt;This option would store data using the basic 6 fields. Unusual calendar systems would choose their own most important fields. &lt;/p&gt;
&lt;p&gt;Advantages: &lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;get/set to any of these specific fields is very quick &lt;/li&gt;
&lt;li&gt;resolving invalid dates is obvious, as the leapyear/month/day combination is easy to check &lt;/li&gt;
&lt;li&gt;add of small amounts within stored fields is easy &lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Disadvantages: &lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;get/set to any other field is slow &lt;/li&gt;
&lt;li&gt;difficult to represent an object like&amp;nbsp;!YearWeek (weekyear + week of year) as it doesn't fit &lt;/li&gt;
&lt;li&gt;add requires complex calculation &lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="option-2-duration-from-epoch-in-seconds"&gt;Option 2 - duration from epoch in seconds&lt;/h2&gt;
&lt;p&gt;This option would store data using seconds. &lt;/p&gt;
&lt;p&gt;Advantages: &lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;get/set to all fields is calculated, those below day are quick &lt;/li&gt;
&lt;li&gt;add is quick for all fields except month/year &lt;/li&gt;
&lt;li&gt;able to represent any calendar, including ones like&amp;nbsp;!YearWeek (weekyear + week of year) &lt;/li&gt;
&lt;li&gt;compareTo/equals/hashcode are quick &lt;/li&gt;
&lt;li&gt;conversion to an instant is quick &lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Disadvantages: &lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;get/set to all fields requires calculation &lt;/li&gt;
&lt;li&gt;resolving invalid dates requires calculation of each of year/month/day &lt;/li&gt;
&lt;li&gt;get/set day/month/year requires complex calculation &lt;/li&gt;
&lt;li&gt;add month/year requires complex calculation &lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="option-3-duration-from-epoch-in-seconds-and-months"&gt;Option 3 - duration from epoch in seconds and months&lt;/h2&gt;
&lt;p&gt;This option would store data using the 2 durations - seconds and months. Unusual calendar systems would choose their own fields (the ones with discontinuities). &lt;/p&gt;
&lt;p&gt;Advantages: &lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;get/set to all fields is calculated, most calculations (esp. day/month/year) are quick &lt;/li&gt;
&lt;li&gt;add is quick for all fields (unless an unusual field is not based on a standard field) &lt;/li&gt;
&lt;li&gt;able to represent any calendar, including ones like&amp;nbsp;!YearWeek (weekyear + week of year), eg. by storing 1 duration in weeks &lt;/li&gt;
&lt;li&gt;add month/year is quick &lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Disadvantages: &lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;get/set to all fields requires calculation, but this is quick &lt;/li&gt;
&lt;li&gt;resolving invalid dates requires calculation of each of year/month/day, but this is quick &lt;/li&gt;
&lt;li&gt;add fields below month requires potentially complex calculation if they go over 28 days &lt;/li&gt;
&lt;/ul&gt;
&lt;hr /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a class="" href="/p/threeten/oldwiki/ThreeTen/"&gt;Home page&lt;/a&gt; &lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Stephen Colebourne</dc:creator><pubDate>Thu, 22 May 2014 22:08:04 -0000</pubDate><guid>https://sourceforge.netcba6940b2a856bc5a8c389ee8334fde9ef2c4bf7</guid></item></channel></rss>