Download Reference Manual
The Developer's Library for D
About Wiki Forums Source Search Contact

Changeset 2519

Show
Ignore:
Timestamp:
08/28/07 02:27:22 (1 year ago)
Author:
kris
Message:

closes #543 :: Incorrect hebrew date calculations

Thanks to snoyberg

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/tango/util/time/chrono/Hebrew.d

    r2465 r2519  
    88                        Apr 2007: reshaped                         
    99 
    10         author:         John Chapman, Kris 
     10        author:         John Chapman, Kris, snoyberg 
    1111 
    1212******************************************************************************/ 
     
    2626  private const int[14][7] MonthDays = [ 
    2727    // month                                                    // year type 
    28     [ 0, 0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0 ],  
    29     [ 0, 30, 29, 29, 29, 30, 29, 30, 29, 30, 29, 30, 29, 0 ],   // 1 
    30     [ 0, 30, 29, 30, 29, 30, 29, 30, 29, 30, 29, 30, 29, 0 ],   // 2 
    31     [ 0, 30, 30, 30, 29, 30, 29, 30, 29, 30, 29, 30, 29, 0 ],   // 3 
     28    [ 0, 0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0 ],  
     29    [ 0, 30, 29, 29, 29, 30, 29, 0,  30, 29, 30, 29, 30, 29 ],  // 1 
     30    [ 0, 30, 29, 30, 29, 30, 29, 0,  30, 29, 30, 29, 30, 29 ],  // 2 
     31    [ 0, 30, 30, 30, 29, 30, 29, 0,  30, 29, 30, 29, 30, 29 ],  // 3 
    3232    [ 0, 30, 29, 29, 29, 30, 30, 29, 30, 29, 30, 29, 30, 29 ],  // 4 
    3333    [ 0, 30, 29, 30, 29, 30, 30, 29, 30, 29, 30, 29, 30, 29 ],  // 5 
     
    234234      case 353: 
    235235        // "deficient" 
    236         return 0
     236        return 1
    237237      case 383: 
    238238        // "deficient" leap 
     
    240240      case 354: 
    241241        // "normal" 
    242         return 1
     242        return 2
    243243      case 384: 
    244244        // "normal" leap 
     
    246246      case 355: 
    247247        // "complete" 
    248         return 2
     248        return 3
    249249      case 385: 
    250250        // "complete" leap