Code

Programming Languages: Java

License: Apache License V2.0

Repositories

browse code, statistics svn co https://joda-time.svn.sourceforge.net/svnroot/joda-time joda-time

browse code, statistics, last commit on 2012-05-23 git clone git://joda-time.git.sourceforge.net/gitroot/joda-time/joda-time (read-only)

Show:

What's happening?

  • Comment: Add withChronology to LocalDate

    I'd be happy to accept a GitHub pull request with tests for this.

    2012-05-24 02:34:16 PDT by scolebourne

  • Add withChronology to LocalDate

    Class LocalDate is missing copy method withChronology(Chronology). This means that explicit creation using constructor LocalDate(Object, Chronology) must be used to get an 'adjusted' copy. Presumably, the method would be able to check whether or not the desired chronology is the same as the current chronology, and return an unmodified object if possible, rather than requiring creating...

    2012-05-23 11:54:54 PDT by x-zero

  • Comment: Unable to add days to a MonthDay set to the ISO leap date

    A nasty bug, which should now be fixed in Git. Thanks for the spot.

    2012-05-23 04:47:35 PDT by scolebourne

  • Joda - Time

    scolebourne pushed 6 commit(s) to refs/heads/master in the joda-time Git repository of the Joda - Time project.

    2012-05-23 04:46:56 PDT by scolebourne

  • Unable to add days to a MonthDay set to the ISO leap date

    It's not possible to add days to a MonthDay set to the ISO leap date (February 29th). This is even more bizarre given the exact error message thrown. Sample snippet: final MonthDay isoLeap = new MonthDay(DateTimeConstants.FEBRUARY, 29, ISOChronology.getInstanceUTC()); System.out.println(isoLeap); System.out.println(isoLeap.plusDays(2)); Which generates the following...

    2012-05-22 15:08:58 PDT by https://www.google.com/accounts

  • Comment: Error instantiating from Outlook timezone id

    "W. Europe Standard Time" is not a real timezone id. They look like this - http://joda-time.sourceforge.net/timezones.html So, either the id you are using is manually created (some part of your code is creating a SimpleTimeZone) or there is some other mechanism picking up the id. To fix this, you need to use an ID recognized by Joda-Time, such as "WET" (West Europe...

    2012-05-19 02:08:58 PDT by scolebourne

  • Followup: RE: Calculating Business Days

    You will need a proper source of holiday data, as weekends and holidays vary. You may then want to look at ObjectLabKit http://objectlabkit.sourceforge.net/ - or do the calculation yourself. Essentially you'd need a method that takes a LocalDate and checks whether it matches certain criteria (like Saturday or Sunday). You can then use that method with repeated calls to plusDays(1) to get the...

    2012-05-17 12:17:28 PDT by scolebourne

  • Calculating Business Days

    What's the best way to calculate the number of BUSINESS days between two dates (meaning excluding weekends dates)??.

    2012-05-17 09:04:59 PDT by dkordik

  • Comment: Parsing date times during DST overlaps

    I tried to get the behaviour in all the different places reasonably consistent, but unfortunately, the internal design isn't conducive to simple fixes or tweaks. Your code looks "non-ideal", but with the easy offset-control solution, I'd be reluctant to try and look at that hairy code again!

    2012-05-16 14:37:41 PDT by scolebourne

  • Error instantiating from Outlook timezone id

    When reusing the timezone ID 'W. Europe Standard Time' (in a java.util.timezone object) coming from an Outlook ical request the following error will occur: return startDate.withZone(DateTimeZone.forTimeZone(getTimeZone())); -> "The datetime zone id 'W. Europe Standard Time' is not recognised" When converting it to a calendar first it will work: Calendar calStart =...

    2012-05-14 08:54:19 PDT by rwetzold

Our Numbers