File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -235,6 +235,23 @@ The constructor also allows setting a timezone or custom referenced date::
235
235
error handling across versions of PHP, thanks to polyfilling `PHP 8.3's behavior `_
236
236
on the topic.
237
237
238
+ ``DatePoint `` also allows to set and get the microsecond part of the date and time::
239
+
240
+ $datePoint = new DatePoint();
241
+ $datePoint->setMicroseconds(345);
242
+ $microseconds = $datePoint->getMicroseconds();
243
+
244
+ .. note ::
245
+
246
+ This feature polyfills PHP 8.4's behavior on the topic, as microseconds manipulation
247
+ is not available in previous versions of PHP.
248
+
249
+ .. versionadded :: 7.1
250
+
251
+ The :method: `Symfony\\ Component\\ Clock\\ DatePoint::setMicroseconds ` and
252
+ :method: `Symfony\\ Component\\ Clock\\ DatePoint::getMicroseconds ` methods were
253
+ introduced in Symfony 7.1.
254
+
238
255
.. _clock_writing-tests :
239
256
240
257
Writing Time-Sensitive Tests
You can’t perform that action at this time.
0 commit comments