Re: RFC Concept: "Import" of simplied string manipulation and other instructions from ASP Classic
| From: | Daniele B via internals | Date: | Sat, 25 Sep 2021 20:42:18 +0000 |
| Subject: | Re: RFC Concept: "Import" of simplied string manipulation and other instructions from ASP Classic | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-116168@lists.php.net to get a copy of this message | ||
Hello David,
> I can agree with you that the current ways are a bit confusing for a
beginner..
You got the point of my shaking hand for simplification. Although I state you here thatas
freelancer, thinking to new ideas, public web apps, finding customers, contracts,client retention..
further than coding and projecting.. I will hope to remain a "PHP beginner" still for a
long time (?).
If we talk about syntax a month() function is simple and date("i") is a complication.Then
I agree with you that is easy for anyone to write this month function.. But, then, asI can't
force anyone on my ideas, become just matter of "beauty"? It is that?So about
simplification we do not agree a lot, maybe..
However, I invite you to not solve this RFC Concept with a 3rd party package. My ownpersonality is
so frustrating - what a pain.. - that I force myself to not install any3rd party package on my
server.
Daniele Boninihttp://github.com/par7133
------ Original message ------From:
david.proweb@gmail.comDate: Sat, 25 Sep 2021 20:00:56 +0000Subject: Re: RFC Concept:
"Import" of simplied string manipulation and other instructions from ASP Classic
Hello!
Why are the current date() alternatives not working for you?
- is_date() => checkdate(int $month, int $day, int $year) or
DateTime::createFromFormat('Y-m-d', $date) !== false;
- year() => date('Y');
- month() => date('m');
- day() => date('d');
- hour() => date('H');
- minute() => date('i');
- second() => date('s');
- week() => date('W');
I can agree with you that the current ways are a bit confusing for a
beginner. For example, I myself didn't know the representation of weeks
using date() -- I had to search. But I think creating new "root functions"
would be too much. Perhaps a package like Carbon could be very useful. Or
even the DateTime itself.
Atenciosamente,
David Rodrigues