<commit_before><?xml version="1.0" encoding="ISO-8859-1"?>

<document>

 <properties>
  <title>Java date and time API - Home</title>
  <author email="scolebourne.at.users.sourceforge.net"><NAME></author>
  <author email="almajor.at.boxspoon.com"><NAME></author>
 </properties>

 <body>

<section name="Joda Time - Java date and time API">
<p>
Joda-Time provides a quality replacement for the Java <em>date</em>
and <em>time</em> classes. The design allows for multiple <em>calendar</em>
systems, while still providing a simple API.
The 'default' calendar is the <a href="cal_iso.html">ISO8601</a> standard which
is used by XML. The Gregorian, Julian, Buddhist, Coptic and Ethiopic systems are also
included, and we welcome further additions. Supporting classes include time zone,
duration, format and parsing.
</p>
<p>
As a flavour of Joda-Time, here's some example code:
<source>
public boolean isAfterPayDay(<a href="api-release/index.html?org/joda/time/DateTime.html"><b>DateTime</b></a> datetime) {
  if (datetime.getMonthOfYear() == 2) {   // February is month 2!!
    return datetime.getDayOfMonth() > 26;
  }
  return datetime.getDayOfMonth() > 28;
}
public <a href="api-release/index.html?org/joda/time/Days.html"><b>Days</b></a> daysToNewYear(<a href="api-release/index.html?org/joda/time/LocalDate.html"><b>LocalDate</b></a> fromDate) {
  <a href="api-release/index.html?org/joda/time/LocalDate.html"><b>LocalDate</b></a> newYear = fromDate.plusYears(1).withDayOfYear(1);
  return <a href="api-release/index.html?org/joda/time/Days.html"><b>Days</b></a>.daysBetween(fromDate, newYear);
}
public boolean isRentalOverdue(<a href="api-release/index.html?org/joda/time/DateTime.html"><b>DateTime</b></a> datetimeRented) {
  <a href="api-release/index.html?org/joda/time/Period.html"><b>Period</b></a> rentalPeriod = new <a href="api-release/index.html?org/joda/time/Period.html"><b>Period</b></a>().withDays(2).withHours(12);
  return datetimeRented.plus(rentalPeriod).isBeforeNow();
}
public boolean isDoubleShift(<a href="api-release/index.html?org/joda/time/LocalTime.html"><b>LocalTime</b></a> startTime, <a href="api-release/index.html?org/joda/time/LocalTime.html"><b>LocalTime</b></a> endTime) {
  <a href="api-release/index.html?org/joda/time/Hours.html"><b>Hours</b></a> hoursBetween = <a href="api-release/index.html?org/joda/time/Hours.html"><b>Hours</b></a>.hoursBetween(time1, time2);
  return hoursBetween.isGreaterThan(<a href="api-release/index.html?org/joda/time/Hours.html"><b>Hours</b></a>.EIGHT);
}
public String getBirthMonthText(<a href="api-release/index.html?org/joda/time/LocalDate.html"><b>LocalDate</b></a> dateOfBirth) {
  return dateOfBirth.monthOfYear().getAsText(Locale.ENGLISH);
}
public boolean isJoinedInLastThreeMonths(<a href="api-release/index.html?org/joda/time/DateTime.html"><b>DateTime</b></a> datetimeJoined) {
  <a href="api-release/index.html?org/joda/time/Interval.html"><b>Interval</b></a> last3Months = new <a href="api-release/index.html?org/joda/time/Interval.html"><b>Interval</b></a>(<a href="api-release/index.html?org/joda/time/Months.html"><b>Months</b></a>.THREE, new <a href="api-release/index.html?org/joda/time/DateTime.html"><b>DateTime</b></a>());
  return last3Months.contains(datetimeJoined);
}
</source>
Version 1.3 was released on 2006-08-02 -
<a href="http://sourceforge.net/project/showfiles.php?group_id=97367&amp;package_id=104212">Download now</a>
</p>
</section>


<section name="Why Joda Time?">
<p>
Joda-Time has been created to radically change date and time handling is Java.
The JDK classes Date and Calendar are very badly designed, have had numerous bugs
and have odd performance effects.
Here are some of our reasons for developing and using Joda-Time:
<ul>
<li><b>Easy to Use</b>.
Calendar makes accessing 'normal' dates difficult, due to the
lack of simple methods. Joda-Time has straightforward field accessors
such as <code>getYear()</code> or <code>getDayOfWeek()</code>.</li>

<li><b>Easy to Extend</b>.
The JDK supports multiple calendar systems via subclasses of <code>Calendar</code>.
This is clunky, and in practice it is very difficult to write another calendar system.
Joda-Time supports multiple calendar systems via a pluggable system based on the
<code>Chronology</code> class.</li>

<li><b>Comprehensive Feature Set</b>.
The library is intended to provide all the functionality that is required for date-time
calculations. It already provides out-of-the-box features, such as support for oddball
date formats, which are difficult to replicate with the JDK.</li>

<li><b>Up-to-date Time Zone calculations</b>.
The <a href="timezones.html">time zone implementation</a> is based on
the public <a href="http://www.twinsun.com/tz/tz-link.htm">tz database</a>, which is
updated several times a year. New Joda-Time releases incorporate all changes
made to this database. Should the changes be needed earlier,
<a href="tz_update.html">manually updating the zone data</a> is easy.</li>

<li><b>Calendar support</b>.
The library currently provides 8 calendar systems. More will be added in the future.</li>

<li><b>Easy interoperability</b>.
The library internally uses a millisecond instant which is identical to the JDK and similar
to other common time representations. This makes interoperability easy, and Joda-Time comes
with out-of-the-box JDK interoperability.</li>

<li><b>Better Performance Characteristics</b>.
Calendar has strange performance characteristics as it recalculates fields at unexpected moments.
Joda-Time does only the minimal calculation for the field that is being accessed.</li>

<li><b>Good Test Coverage</b>.
Joda-Time has a comprehensive set of developer tests, providing assurance of the library's quality.</li>

<li><b>Complete Documentation</b>.
There is a full <a href="userguide.html">User Guide</a> which provides an overview and covers
common usage scenarios. The <a href="api-release/index.html">javadoc</a>
is extremely detailed and covers the rest of the API.</li>

<li><b>Maturity</b>.
The library has been under active development since 2002.
Although it continues to be improved with the addition of new features and
bug-fixes, it is a mature and reliable code base.</li>

<li><b>Open Source</b>.
Joda-Time is licenced under the business friendly <a href="license.html">Apache License Version 2.0</a>.</li>
</ul>
</p>
</section>

<section name="Documentation">
<p>
Various documentation is available:
<ul>
<li>Two user guides - <a href="quickstart.html">quick</a> and <a href="userguide.html">full</a></li>
<li>The key concepts and chronology documents in the left navigation area</li>
<li>The javadoc for the <a href="api-release/index.html">current release</a></li>
<li>The javadoc for the <a href="apidocs/index.html">latest code in development</a></li>
<li>A <a href="faq.html">FAQ</a> list</li>
<li>Information on <a href="installation.html">downloading and installing</a> Joda-Time</li>
<li>The <a href="http://svn.sourceforge.net/viewcvs.cgi/joda-time/trunk/JodaTime/">Subversion repository</a></li>
</ul>
</p>
</section>

<section name="Releases">
<p>
<a href="http://sourceforge.net/project/showfiles.php?group_id=97367&amp;package_id=104212">Release 1.3</a>
is the current latest release.
This release is considered stable and worthy of the 1.x tag.
It has extensive testing suites and has been used in production.
We now recommend JDK 1.3 or later, and have performed no testing on earlier JDKs.
</p>
<p>
We will support the 1.x product line using standard Java mechanisms.
The main public API will remain backwards compatible for both source and binary.
The version number will change to 2.0 to indicate a change in compatibility.
</p>
</section>

<section name="Support">
<p>
For support on bugs, using the library or to volunteer please contact the <a href="mail-lists.html">mailing list</a>.
Due to spam, you must be subscribed to post to the mailing list.
</p>
<p>
Alternatively, you can contact the project lead, <NAME> via scolebourne.at.users.sourceforge.net.
</p>
</section>
</body>
</document>
<commit_msg>Update support section, reduce examples<commit_after><?xml version="1.0" encoding="ISO-8859-1"?>

<document>

 <properties>
  <title>Java date and time API - Home</title>
  <author email="scolebourne.at.users.sourceforge.net"><NAME></author>
  <author email="almajor.at.boxspoon.com"><NAME></author>
 </properties>

 <body>

<section name="Joda Time - Java date and time API">
<p>
Joda-Time provides a quality replacement for the Java <em>date</em>
and <em>time</em> classes. The design allows for multiple <em>calendar</em>
systems, while still providing a simple API.
The 'default' calendar is the <a href="cal_iso.html">ISO8601</a> standard which
is used by XML. The Gregorian, Julian, Buddhist, Coptic and Ethiopic systems are also
included, and we welcome further additions. Supporting classes include time zone,
duration, format and parsing.
</p>
<p>
As a flavour of Joda-Time, here's some example code:
<source>
public boolean isAfterPayDay(<a href="api-release/index.html?org/joda/time/DateTime.html"><b>DateTime</b></a> datetime) {
  if (datetime.getMonthOfYear() == 2) {   // February is month 2!!
    return datetime.getDayOfMonth() > 26;
  }
  return datetime.getDayOfMonth() > 28;
}

public <a href="api-release/index.html?org/joda/time/Days.html"><b>Days</b></a> daysToNewYear(<a href="api-release/index.html?org/joda/time/LocalDate.html"><b>LocalDate</b></a> fromDate) {
  <a href="api-release/index.html?org/joda/time/LocalDate.html"><b>LocalDate</b></a> newYear = fromDate.plusYears(1).withDayOfYear(1);
  return <a href="api-release/index.html?org/joda/time/Days.html"><b>Days</b></a>.daysBetween(fromDate, newYear);
}

public boolean isRentalOverdue(<a href="api-release/index.html?org/joda/time/DateTime.html"><b>DateTime</b></a> datetimeRented) {
  <a href="api-release/index.html?org/joda/time/Period.html"><b>Period</b></a> rentalPeriod = new <a href="api-release/index.html?org/joda/time/Period.html"><b>Period</b></a>().withDays(2).withHours(12);
  return datetimeRented.plus(rentalPeriod).isBeforeNow();
}

public String getBirthMonthText(<a href="api-release/index.html?org/joda/time/LocalDate.html"><b>LocalDate</b></a> dateOfBirth) {
  return dateOfBirth.monthOfYear().getAsText(Locale.ENGLISH);
}
</source>
<!--
public boolean isDoubleShift(<a href="api-release/index.html?org/joda/time/LocalTime.html"><b>LocalTime</b></a> startTime, <a href="api-release/index.html?org/joda/time/LocalTime.html"><b>LocalTime</b></a> endTime) {
  <a href="api-release/index.html?org/joda/time/Hours.html"><b>Hours</b></a> hoursBetween = <a href="api-release/index.html?org/joda/time/Hours.html"><b>Hours</b></a>.hoursBetween(time1, time2);
  return hoursBetween.isGreaterThan(<a href="api-release/index.html?org/joda/time/Hours.html"><b>Hours</b></a>.EIGHT);
}
public boolean isJoinedInLastThreeMonths(<a href="api-release/index.html?org/joda/time/DateTime.html"><b>DateTime</b></a> datetimeJoined) {
  <a href="api-release/index.html?org/joda/time/Interval.html"><b>Interval</b></a> last3Months = new <a href="api-release/index.html?org/joda/time/Interval.html"><b>Interval</b></a>(<a href="api-release/index.html?org/joda/time/Months.html"><b>Months</b></a>.THREE, new <a href="api-release/index.html?org/joda/time/DateTime.html"><b>DateTime</b></a>());
  return last3Months.contains(datetimeJoined);
}
-->
Version 1.3 was released on 2006-08-02 -
<a href="http://sourceforge.net/project/showfiles.php?group_id=97367&amp;package_id=104212">Download now</a>
</p>
</section>


<section name="Why Joda Time?">
<p>
Joda-Time has been created to radically change date and time handling is Java.
The JDK classes Date and Calendar are very badly designed, have had numerous bugs
and have odd performance effects.
Here are some of our reasons for developing and using Joda-Time:
<ul>
<li><b>Easy to Use</b>.
Calendar makes accessing 'normal' dates difficult, due to the
lack of simple methods. Joda-Time has straightforward field accessors
such as <code>getYear()</code> or <code>getDayOfWeek()</code>.</li>

<li><b>Easy to Extend</b>.
The JDK supports multiple calendar systems via subclasses of <code>Calendar</code>.
This is clunky, and in practice it is very difficult to write another calendar system.
Joda-Time supports multiple calendar systems via a pluggable system based on the
<code>Chronology</code> class.</li>

<li><b>Comprehensive Feature Set</b>.
The library is intended to provide all the functionality that is required for date-time
calculations. It already provides out-of-the-box features, such as support for oddball
date formats, which are difficult to replicate with the JDK.</li>

<li><b>Up-to-date Time Zone calculations</b>.
The <a href="timezones.html">time zone implementation</a> is based on
the public <a href="http://www.twinsun.com/tz/tz-link.htm">tz database</a>, which is
updated several times a year. New Joda-Time releases incorporate all changes
made to this database. Should the changes be needed earlier,
<a href="tz_update.html">manually updating the zone data</a> is easy.</li>

<li><b>Calendar support</b>.
The library currently provides 8 calendar systems. More will be added in the future.</li>

<li><b>Easy interoperability</b>.
The library internally uses a millisecond instant which is identical to the JDK and similar
to other common time representations. This makes interoperability easy, and Joda-Time comes
with out-of-the-box JDK interoperability.</li>

<li><b>Better Performance Characteristics</b>.
Calendar has strange performance characteristics as it recalculates fields at unexpected moments.
Joda-Time does only the minimal calculation for the field that is being accessed.</li>

<li><b>Good Test Coverage</b>.
Joda-Time has a comprehensive set of developer tests, providing assurance of the library's quality.</li>

<li><b>Complete Documentation</b>.
There is a full <a href="userguide.html">User Guide</a> which provides an overview and covers
common usage scenarios. The <a href="api-release/index.html">javadoc</a>
is extremely detailed and covers the rest of the API.</li>

<li><b>Maturity</b>.
The library has been under active development since 2002.
Although it continues to be improved with the addition of new features and
bug-fixes, it is a mature and reliable code base.</li>

<li><b>Open Source</b>.
Joda-Time is licenced under the business friendly <a href="license.html">Apache License Version 2.0</a>.</li>
</ul>
</p>
</section>

<section name="Documentation">
<p>
Various documentation is available:
<ul>
<li>Two user guides - <a href="quickstart.html">quick</a> and <a href="userguide.html">full</a></li>
<li>The key concepts and chronology documents in the left navigation area</li>
<li>The javadoc for the <a href="api-release/index.html">current release</a></li>
<li>The javadoc for the <a href="apidocs/index.html">latest code in development</a></li>
<li>A <a href="faq.html">FAQ</a> list</li>
<li>Information on <a href="installation.html">downloading and installing</a> Joda-Time</li>
<li>The <a href="http://svn.sourceforge.net/viewcvs.cgi/joda-time/trunk/JodaTime/">Subversion repository</a></li>
</ul>
</p>
</section>

<section name="Releases">
<p>
<a href="http://sourceforge.net/project/showfiles.php?group_id=97367&amp;package_id=104212">Release 1.3</a>
is the current latest release.
This release is considered stable and worthy of the 1.x tag.
It has extensive testing suites and has been used in production.
We now recommend JDK 1.3 or later, and have performed no testing on earlier JDKs.
</p>
<p>
We will support the 1.x product line using standard Java mechanisms.
The main public API will remain backwards compatible for both source and binary.
The version number will change to 2.0 to indicate a change in compatibility.
</p>
</section>

<section name="Support">
<p>
Support on bugs, library usage or enhancement requests is available via:
</p>
<ul>
<li>the joda-interest <a href="mail-lists.html">mailing list</a>. Due to spam, you must be subscribed to post to the mailing list.</li>
<li>the joda-time sourceforge <a href="http://sourceforge.net/forum/forum.php?forum_id=337835">forum</a>.</li>
</ul>
<p>
Alternatively, you can contact the project lead, <NAME> via scolebourne.at.users.sourceforge.net.
</p>
</section>
</body>
</document>

{'fraction_non_alphanumeric': 0.14669446829387955, 'fraction_numerical': 0.009321722065497364, 'mean_word_length': 5.3205426356589145, 'pattern_counts': {'":': 0, '<': 472, '<?xml version=': 2, '>': 476, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1425902', 'n_tokens_mistral': 5443, 'n_tokens_neox': 5196, 'n_words': 1559}