1 | <?php |
||
10 | class Date extends Carbon implements JsonSerializable |
||
11 | { |
||
12 | use Macroable; |
||
13 | |||
14 | /** |
||
15 | * The custom Carbon JSON serializer. |
||
16 | * |
||
17 | * @var callable|null |
||
18 | */ |
||
19 | protected static $serializer; |
||
20 | |||
21 | /** |
||
22 | * Formats the date to a short date string. |
||
23 | * |
||
24 | * @return string |
||
25 | * @throws \Punic\Exception |
||
26 | */ |
||
27 | 3 | public function toShortDateString() |
|
35 | |||
36 | /** |
||
37 | * Formats the date to a medium date string. |
||
38 | * |
||
39 | * @return string |
||
40 | * @throws \Punic\Exception |
||
41 | */ |
||
42 | 3 | public function toMediumDateString() |
|
50 | |||
51 | /** |
||
52 | * Formats the date to a long date string. |
||
53 | * |
||
54 | * @return string |
||
55 | * @throws \Punic\Exception |
||
56 | */ |
||
57 | 3 | public function toLongDateString() |
|
65 | |||
66 | /** |
||
67 | * Formats the date to a full date string. |
||
68 | * |
||
69 | * @return string |
||
70 | * @throws \Punic\Exception |
||
71 | */ |
||
72 | 3 | public function toFullDateString() |
|
80 | |||
81 | /** |
||
82 | * Formats the date to a short time string. |
||
83 | * |
||
84 | * @return string |
||
85 | * @throws \Punic\Exception |
||
86 | */ |
||
87 | 3 | public function toShortTimeString() |
|
95 | |||
96 | /** |
||
97 | * Formats the date to a medium time string. |
||
98 | * |
||
99 | * @return string |
||
100 | * @throws \Punic\Exception |
||
101 | */ |
||
102 | 3 | public function toMediumTimeString() |
|
110 | |||
111 | /** |
||
112 | * Formats the date to a long time string. |
||
113 | * |
||
114 | * @return string |
||
115 | * @throws \Punic\Exception |
||
116 | */ |
||
117 | 3 | public function toLongTimeString() |
|
125 | |||
126 | /** |
||
127 | * Formats the date to a full time string. |
||
128 | * |
||
129 | * @return string |
||
130 | * @throws \Punic\Exception |
||
131 | */ |
||
132 | 3 | public function toFullTimeString() |
|
140 | |||
141 | /** |
||
142 | * Formats the date to a short datetime string. |
||
143 | * |
||
144 | * @return string |
||
145 | * @throws \Punic\Exception |
||
146 | */ |
||
147 | 3 | public function toShortDatetimeString() |
|
155 | |||
156 | /** |
||
157 | * Formats the date to a medium datetime string. |
||
158 | * |
||
159 | * @return string |
||
160 | * @throws \Punic\Exception |
||
161 | */ |
||
162 | 3 | public function toMediumDatetimeString() |
|
170 | |||
171 | /** |
||
172 | * Formats the date to a long datetime string. |
||
173 | * |
||
174 | * @return string |
||
175 | * @throws \Punic\Exception |
||
176 | */ |
||
177 | 3 | public function toLongDatetimeString() |
|
185 | |||
186 | /** |
||
187 | * Formats the date to a full datetime string. |
||
188 | * |
||
189 | * @return string |
||
190 | * @throws \Punic\Exception |
||
191 | */ |
||
192 | 3 | public function toFullDatetimeString() |
|
200 | |||
201 | /** |
||
202 | * Get the short date format. |
||
203 | * |
||
204 | * @return string |
||
205 | * @throws \Punic\Exception |
||
206 | */ |
||
207 | 3 | public function getShortDateFormat() |
|
211 | |||
212 | /** |
||
213 | * Get the medium date format. |
||
214 | * |
||
215 | * @return string |
||
216 | * @throws \Punic\Exception |
||
217 | */ |
||
218 | 3 | public function getMediumDateFormat() |
|
222 | |||
223 | /** |
||
224 | * Get the long date format. |
||
225 | * |
||
226 | * @return string |
||
227 | * @throws \Punic\Exception |
||
228 | */ |
||
229 | 3 | public function getLongDateFormat() |
|
233 | |||
234 | /** |
||
235 | * Get the full date format. |
||
236 | * |
||
237 | * @return string |
||
238 | * @throws \Punic\Exception |
||
239 | */ |
||
240 | 3 | public function getFullDateFormat() |
|
244 | |||
245 | /** |
||
246 | * Get the short time format. |
||
247 | * |
||
248 | * @return string |
||
249 | * @throws \Punic\Exception |
||
250 | */ |
||
251 | 3 | public function getShortTimeFormat() |
|
255 | |||
256 | /** |
||
257 | * Get the medium time format. |
||
258 | * |
||
259 | * @return string |
||
260 | * @throws \Punic\Exception |
||
261 | */ |
||
262 | 3 | public function getMediumTimeFormat() |
|
266 | |||
267 | /** |
||
268 | * Get the long time format. |
||
269 | * |
||
270 | * @return string |
||
271 | * @throws \Punic\Exception |
||
272 | */ |
||
273 | 3 | public function getLongTimeFormat() |
|
277 | |||
278 | /** |
||
279 | * Get the full time format. |
||
280 | * |
||
281 | * @return string |
||
282 | * @throws \Punic\Exception |
||
283 | */ |
||
284 | 3 | public function getFullTimeFormat() |
|
288 | |||
289 | /** |
||
290 | * Get the short datetime format. |
||
291 | * |
||
292 | * @return string |
||
293 | * @throws \Punic\Exception |
||
294 | */ |
||
295 | 3 | public function getShortDatetimeFormat() |
|
299 | |||
300 | /** |
||
301 | * Get the medium datetime format. |
||
302 | * |
||
303 | * @return string |
||
304 | * @throws \Punic\Exception |
||
305 | */ |
||
306 | 3 | public function getMediumDatetimeFormat() |
|
310 | |||
311 | /** |
||
312 | * Get the long datetime format. |
||
313 | * |
||
314 | * @return string |
||
315 | * @throws \Punic\Exception |
||
316 | */ |
||
317 | 3 | public function getLongDatetimeFormat() |
|
321 | |||
322 | /** |
||
323 | * Get the full datetime format. |
||
324 | * |
||
325 | * @return string |
||
326 | * @throws \Punic\Exception |
||
327 | */ |
||
328 | 3 | public function getFullDatetimeFormat() |
|
332 | |||
333 | /** |
||
334 | * Prepare the object for JSON serialization. |
||
335 | * |
||
336 | * @return array|string |
||
337 | */ |
||
338 | 12 | public function jsonSerialize() |
|
350 | |||
351 | /** |
||
352 | * JSON serialize all Carbon instances using the given callback. |
||
353 | * |
||
354 | * @param callable $callback |
||
355 | * @return void |
||
356 | */ |
||
357 | public static function serializeUsing($callback) |
||
361 | } |