Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Ticket #10664 (closed defect: fixed)

Opened 9 months ago

Last modified 9 months ago

[PATCH] Date Helper test fails due to the rollover to 2008

Reported by: wesley.moxam Assigned to: core
Priority: normal Milestone: 2.x
Component: ActionPack Version: edge
Severity: minor Keywords: verified
Cc:

Description

Hardcoded years are bad.

Attachments

date_helper_test.patch (0.7 kB) - added by wesley.moxam on 01/01/08 23:26:47.
Updated to fit existing style in other tests

Change History

01/01/08 23:26:47 changed by wesley.moxam

  • attachment date_helper_test.patch added.

Updated to fit existing style in other tests

01/01/08 23:29:20 changed by wesley.moxam

  • summary changed from Date Helper test fails due to the rollover to 2008 to [PATCH] Date Helper test fails due to the rollover to 2008.

01/02/08 01:15:30 changed by danger

great catch wesley. Might I recommend using 5.years.ago and 5.years.from_now instead?

01/02/08 04:51:27 changed by wesley.moxam

@danger: I'm not sure that 5.years.ago.year is any more readable than Time.now.year - 5

Either way, the other tests use the latter format so I'd rather stick to convention.

01/02/08 06:20:04 changed by chuyeow

+1

01/02/08 06:23:20 changed by danger

+1

01/02/08 15:35:26 changed by DefV

+1

but I'd also prefer 5.years.ago

01/02/08 17:34:51 changed by thewoolleyman

  • keywords set to verified.

+1

01/02/08 18:09:56 changed by bitsweat

  • status changed from new to closed.
  • resolution set to fixed.

(In [8526]) Fix failing date helper test. Closes #10664 [Wesley Moxam]