Date vs. DateTime #5

Open
chiperific opened this Issue Feb 27, 2013 · 1 comment

Comments

Projects
None yet
2 participants
@chiperific
Contributor

chiperific commented Feb 27, 2013

irb(main):005:0> @start_date = Date.new(2013,2,1) => Fri, 01 Feb 2013 irb(main):006:0> @start_date.financial_year #correct => 2013 irb(main):007:0> @start_date.beginning_of_financial_year => Mon, 01 Jul 2013 #correct irb(main):008:0> @second_date = DateTime.new(2013,2,1) => Fri, 01 Feb 2013 00:00:00 +0000 irb(main):009:0> @second_date.financial_year => 2014 #incorrect irb(main):010:0> @second_date.beginning_of_financial_year => Wed, 01 Jan 2014 00:00:00 +0000 #incorrect

Seems to struggle to differentiate between Date and DateTime, maybe?

@asanghi

This comment has been minimized.

Show comment Hide comment
@asanghi

asanghi Feb 27, 2013

Owner

Odd at first look! Do you mind submitting a pull request with a failing test?

Owner

asanghi commented Feb 27, 2013

Odd at first look! Do you mind submitting a pull request with a failing test?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment