Req #50249 [Asn->Wfx]: ordinal month days don't work

From: Date: Fri, 13 May 2022 10:33:16 +0000
Subject: Req #50249 [Asn->Wfx]: ordinal month days don't work
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-241479@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=50249&edit=1

 ID:                 50249
 Updated by:         derick@php.net
 Reported by:        jennifer dot kimball at nrc dot ca
 Summary:            ordinal month days don't work
-Status:             Assigned
+Status:             Wont fix
 Type:               Feature/Change Request
 Package:            Date/time related
 Operating System:   Solaris 10
 PHP Version:        5.3.1
 Assigned To:        derick
 Block user comment: N
 Private report:     N

 New Comment:

I am marking this as "Won't Fix". If this is still an issue, please open a new ticket
at https://github.com/php/php-src/issues/


Previous Comments:
------------------------------------------------------------------------
[2010-03-07 14:10:23] derick@php.net

Changing this to a feature request.

------------------------------------------------------------------------
[2009-11-24 12:55:26] jennifer dot kimball at nrc dot ca

Thanks for your suggestions. I wish you success in adding support for "date of next month"
expressions. Thanks.

------------------------------------------------------------------------
[2009-11-23 15:05:23] rasmus@php.net

I think a better way to do it currently is just to do it in 2 steps:

$d=date_create('first day of next month');
$d->modify("+2 days");


------------------------------------------------------------------------
[2009-11-23 13:41:56] derick@php.net

I'll see if we can support this in some way without breaking anything else— please ignore
what Sjoerd wrote. mktime() and timestamps should be avoided!

------------------------------------------------------------------------
[2009-11-23 13:05:24] sjoerd@php.net

Thank you for your bug report.

Here is a piece of code which may do what you want:
<?php
$current_month = date('m');
$fourth_day = mktime(0, 0, 0, $current_month + 1, 4);
echo date('c', $fourth_day);
?>

------------------------------------------------------------------------


The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at

    https://bugs.php.net/bug.php?id=50249


--
Edit this bug report at https://bugs.php.net/bug.php?id=50249&edit=1


Thread (8 messages)

« previous php.bugs (#241479) next »