Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't smartmatch a DateTime against a Date #3399

Closed
p6rt opened this issue May 30, 2014 · 6 comments
Closed

Can't smartmatch a DateTime against a Date #3399

p6rt opened this issue May 30, 2014 · 6 comments
Labels
NYI Features not yet implemented

Comments

@p6rt
Copy link

p6rt commented May 30, 2014

Migrated from rt.perl.org#121990 (status was 'resolved')

Searchable as RT121990$

@p6rt
Copy link
Author

p6rt commented May 30, 2014

From @masak

<BenGoldberg> Woodi, a Date is like today, or tommorroy, or June 4, 1977
<BenGoldberg> A DateTime is like Friday May 30, 2014 11​:11 AM and
3.141592 seconds.
<masak> Woodi​: though not strictly necessary, Date is there for two
very good reasons​:
<BenGoldberg> Each Date object refers to a range of real-world times.
One can probably write if( $some-date.contains($some-datetime) ), or
something similar.
<masak> m​: my $now = DateTime.now; my $today = Date.today; say $now ~~ $today
<camelia> rakudo-moar 90cd58​: OUTPUT«False␤»
* masak submits rakudobug
<masak> BenGoldberg​: that's how you'd write it, IMO.

The above should return True, of course.

@p6rt
Copy link
Author

p6rt commented Jul 30, 2014

From @perlpilot

On Fri May 30 08​:20​:25 2014, masak wrote​:

<BenGoldberg> Woodi, a Date is like today, or tommorroy, or June 4,
1977
<BenGoldberg> A DateTime is like Friday May 30, 2014 11​:11 AM and
3.141592 seconds.
<masak> Woodi​: though not strictly necessary, Date is there for two
very good reasons​:
<BenGoldberg> Each Date object refers to a range of real-world times.
One can probably write if( $some-date.contains($some-datetime) ), or
something similar.
<masak> m​: my $now = DateTime.now; my $today = Date.today; say $now ~~
$today
<camelia> rakudo-moar 90cd58​: OUTPUT«False␤»
* masak submits rakudobug
<masak> BenGoldberg​: that's how you'd write it, IMO.

The above should return True, of course.

See rakudo/rakudo@509b1a4e9d and Raku/roast@d5bf9b7f44

-Scott

@p6rt
Copy link
Author

p6rt commented Jul 30, 2014

The RT System itself - Status changed from 'new' to 'open'

@p6rt
Copy link
Author

p6rt commented Oct 20, 2014

From @usev6

On Wed Jul 30 10​:59​:43 2014, duff wrote​:

On Fri May 30 08​:20​:25 2014, masak wrote​:

<BenGoldberg> Woodi, a Date is like today, or tommorroy, or June 4,
1977
<BenGoldberg> A DateTime is like Friday May 30, 2014 11​:11 AM and
3.141592 seconds.
<masak> Woodi​: though not strictly necessary, Date is there for two
very good reasons​:
<BenGoldberg> Each Date object refers to a range of real-world times.
One can probably write if( $some-date.contains($some-datetime) ), or
something similar.
<masak> m​: my $now = DateTime.now; my $today = Date.today; say $now
~~
$today
<camelia> rakudo-moar 90cd58​: OUTPUT«False␤»
* masak submits rakudobug
<masak> BenGoldberg​: that's how you'd write it, IMO.

The above should return True, of course.

See rakudo/rakudo@509b1a4e9d and
Raku/roast@d5bf9b7f44

-Scott

Since this is implemented and tested in roast, I'm closing this ticket.

1 similar comment
@p6rt
Copy link
Author

p6rt commented Oct 20, 2014

From @usev6

On Wed Jul 30 10​:59​:43 2014, duff wrote​:

On Fri May 30 08​:20​:25 2014, masak wrote​:

<BenGoldberg> Woodi, a Date is like today, or tommorroy, or June 4,
1977
<BenGoldberg> A DateTime is like Friday May 30, 2014 11​:11 AM and
3.141592 seconds.
<masak> Woodi​: though not strictly necessary, Date is there for two
very good reasons​:
<BenGoldberg> Each Date object refers to a range of real-world times.
One can probably write if( $some-date.contains($some-datetime) ), or
something similar.
<masak> m​: my $now = DateTime.now; my $today = Date.today; say $now
~~
$today
<camelia> rakudo-moar 90cd58​: OUTPUT«False␤»
* masak submits rakudobug
<masak> BenGoldberg​: that's how you'd write it, IMO.

The above should return True, of course.

See rakudo/rakudo@509b1a4e9d and
Raku/roast@d5bf9b7f44

-Scott

Since this is implemented and tested in roast, I'm closing this ticket.

@p6rt
Copy link
Author

p6rt commented Oct 20, 2014

@usev6 - Status changed from 'open' to 'resolved'

@p6rt p6rt closed this as completed Oct 20, 2014
@p6rt p6rt added the NYI Features not yet implemented label Jan 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
NYI Features not yet implemented
Projects
None yet
Development

No branches or pull requests

1 participant