- Reverts the schneespur/ subdirectory restructure (b8e426b)
- Restores package.json and vite.config.js (needed for npm build, were
removed in an earlier cleanup before the restructure)
- Updates public/build/ assets with current Vite output (new content hashes)
25 lines
472 B
PHP
25 lines
472 B
PHP
<?php
|
|
|
|
namespace Safe;
|
|
|
|
use Safe\Exceptions\CalendarException;
|
|
|
|
/**
|
|
* @param int|null $timestamp
|
|
* @return int
|
|
* @throws CalendarException
|
|
*
|
|
*/
|
|
function unixtojd(?int $timestamp = null): int
|
|
{
|
|
error_clear_last();
|
|
if ($timestamp !== null) {
|
|
$safeResult = \unixtojd($timestamp);
|
|
} else {
|
|
$safeResult = \unixtojd();
|
|
}
|
|
if ($safeResult === false) {
|
|
throw CalendarException::createFromPhpError();
|
|
}
|
|
return $safeResult;
|
|
}
|