You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/datetime/src/DateTime.php
+1-70Lines changed: 1 addition & 70 deletions
Original file line number
Diff line number
Diff line change
@@ -120,11 +120,6 @@ public static function now(?Timezone $timezone = null): DateTime
120
120
/**
121
121
* Creates a DateTime instance for a specific time on the current day within the specified timezone.
122
122
*
123
-
* This method facilitates the creation of a {@see DateTime} object representing a precise time on today's date. It is
124
-
* particularly useful when you need to set a specific time of day for the current date in a given timezone. The
125
-
* method combines the current date context with a specific time, offering a convenient way to specify times such
126
-
* as "today at 14:00" in code.
127
-
*
128
123
* The time components (hours, minutes, seconds, nanoseconds) must be within their valid ranges. The method
129
124
* enforces these constraints and throws an {@see Exception\InvalidArgumentException} if any component is out of bounds.
130
125
*
@@ -287,7 +282,7 @@ public static function parse(NativeDateTimeInterface|TemporalInterface|string|in
287
282
/**
288
283
* Parses a date and time string into an instance of {@see Tempest\DateTime\DateTime} using a specific format pattern, with optional customization for timezone and locale.
289
284
*
290
-
* This method is specifically designed for cases where a custom format pattern is used to parse the input string.
285
+
* This method is specifically designed for cases where a custom format pattern is used to parse the input string.
291
286
* It allows for precise control over the parsing process by specifying the exact format pattern that matches the input string.
292
287
* Additionally, the method supports specifying a timezone and locale for parsing, enabling accurate interpretation of locale-specific formats.
293
288
*
@@ -504,70 +499,6 @@ public function withTime(int $hours, int $minutes, int $seconds = 0, int $nanose
504
499
);
505
500
}
506
501
507
-
/**
508
-
* Returns a new instance set to midnight of the same day.
509
-
*/
510
-
publicfunctionstartOfDay(): static
511
-
{
512
-
return$this->withTime(0, 0, 0, 0);
513
-
}
514
-
515
-
/**
516
-
* Returns a new instance set to the end of the day.
517
-
*/
518
-
publicfunctionendOfDay(): static
519
-
{
520
-
return$this->withTime(23, 59, 59, 999_999_999);
521
-
}
522
-
523
-
/**
524
-
* Returns a new instance set to the start of the week.
0 commit comments