Re:PHP DateTimeImmutable::modify()
by bpicolo on Friday July 04, 2014 @11:43AM
(#7989201)
Python does something similar with NamedTuple.replace(). This isn't just some weird crazy PHP thing, as much as people love to rag on PHP.
[ Parent
| on HN ]
Re:PHP DateTimeImmutable::modify()
by bobbyi_settv on Friday July 04, 2014 @02:14PM
(#7989711)
More relevantly, Python does something similar with datetime.replace():
current_minute = datetime.utcnow().replace(second=0, microsecond=0)