Add `V` format specifier for formatting and `createFromFormat`
Đang mở
@derickr đang làm issue này rồi.
Từ ngày 18/3/2024.
Extension: date
Feature
Status: Needs Triage
- Ngôn ngữ chính
- C
- Star
- 40.4k
- Fork
- 8.2k
- Merge trung bình
- 2 ngày 15 giờ
- Pull request đã merge (30 ngày)
- 103
Mô tả
Description
The following code:
<?php
$t = microtime(true);
$now = DateTime::createFromFormat('U.u', $t);
?>
Can fail, in case $t does only contain full seconds. Add V to allow for parsing any seconds + fraction of seconds, as well as add V to DateTimeInterface::format to reproduce the same value.
This would also allow for accepting any microtime(true) output.
PHP Version
PHP 8.3.3
Operating System
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Đánh giá
Issue này chưa được đánh giá.