/webtrees/tests/app/ |
H A D | TimestampTest.php | 32 $timestamp = new Timestamp(mktime(16, 21, 19, 12, 17, 2023), 'UTC', 'en-US'); 35 self::assertSame(2460296, $timestamp->julianDay()); 40 $timestamp = new Timestamp(time(), 'UTC', 'en-US'); 42 self::assertSame('5 years ago', $timestamp->subtractYears(5)->diffForHumans()); 43 self::assertSame('5 months ago', $timestamp->subtractMonths(5)->diffForHumans()); 44 self::assertSame('5 days ago', $timestamp->subtractDays(5)->diffForHumans()); 45 self::assertSame('5 hours ago', $timestamp->subtractHours(5)->diffForHumans()); 46 self::assertSame('5 minutes ago', $timestamp->subtractMinutes(5)->diffForHumans()); 47 self::assertSame('5 seconds ago', $timestamp->subtractSeconds(5)->diffForHumans()); 49 $timestamp = new Timestamp(time(), 'UTC', 'fr_FR'); [all …]
|
/webtrees/app/Factories/ |
H A D | TimestampFactory.php | 41 * @param int $timestamp 46 public function make(int $timestamp, UserInterface|null $user = null): TimestampInterface argument 52 return new Timestamp($timestamp, $timezone, $locale); 65 $timestamp = date_create_from_format($format, $string); 67 if ($timestamp === false) { 71 return $this->make($timestamp->getTimestamp(), $user);
|
/webtrees/app/ |
H A D | Timestamp.php | 35 public function __construct(int $timestamp, string $timezone, string $locale) argument 37 $this->carbon = CarbonImmutable::createFromTimestamp($timestamp, $timezone); 76 public function compare(TimestampInterface $timestamp): int argument 78 return $this->timestamp() <=> $timestamp->timestamp(); 189 public function timestamp(): int function in Fisharebest\\Webtrees\\Timestamp
|
H A D | SessionDatabaseHandler.php | 115 …if ($now->subtractMinutes(1)->timestamp() > Registry::timestampFactory()->fromString($this->row->s…
|
/webtrees/resources/views/components/ |
H A D | datetime.phtml | 13 <?php if ($timestamp->timestamp() === 0) : ?> 18 <span class="wt-timestamp" title="<?= e($timestamp->diffForHumans()) ?>" dir="auto"> 19 <?= e($timestamp->isoFormat('LLLL')) ?>
|
H A D | datetime-diff.phtml | 12 <span class="wt-timestamp" title="<?= e($timestamp->isoFormat('LLLL')) ?>" dir="auto"> 13 <?= e($timestamp->diffForHumans()) ?>
|
/webtrees/app/Contracts/ |
H A D | TimestampInterface.php | 64 * @param TimestampInterface $timestamp 68 public function compare(TimestampInterface $timestamp): int; argument 157 public function timestamp(): int; function
|
H A D | TimestampFactoryInterface.php | 28 * @param int $timestamp 33 public function make(int $timestamp, UserInterface|null $user = null): TimestampInterface; argument
|
/webtrees/app/Services/ |
H A D | HousekeepingService.php | 267 $timestamp = $metadata['timestamp'] ?? false; 269 if ($timestamp !== false && $timestamp < $threshold) {
|
H A D | UserService.php | 152 * @param int $timestamp 156 public function filterInactive(int $timestamp): Closure argument 158 return static function (UserInterface $user) use ($timestamp): bool { 162 return max($registered_at, $logged_in_at) < $timestamp;
|
H A D | MessageService.php | 196 … $six_months_ago = Registry::timestampFactory()->now()->subtractMonths(6)->timestamp();
|
/webtrees/app/Schema/ |
H A D | Migration0.php | 97 $table->timestamp('log_time')->useCurrent(); 116 $table->timestamp('change_time')->useCurrent(); 138 $table->timestamp('created')->useCurrent(); 152 $table->timestamp('updated')->useCurrent(); 389 $table->timestamp('session_time')->useCurrent();
|
H A D | Migration40.php | 42 $table->timestamp('updated')->useCurrent();
|
/webtrees/app/Http/RequestHandlers/ |
H A D | UsersCleanupPage.php | 54 $inactive_threshold = Registry::timestampFactory()->now()->subtractMonths(6)->timestamp(); 55 $unverified_threshold = Registry::timestampFactory()->now()->subtractDays(7)->timestamp();
|
/webtrees/app/Cli/Commands/ |
H A D | UserList.php | 60 …$registered = Registry::timestampFactory()->make(timestamp: $registered)->format(format: 'Y-m-d H:… 66 …$last_login = Registry::timestampFactory()->make(timestamp: $last_login)->format(format: 'Y-m-d H:…
|
/webtrees/app/Statistics/Repository/ |
H A D | LatestUserRepository.php | 117 $timestamp = (int) $user->getPreference(UserInterface::PREF_TIMESTAMP_REGISTERED); 119 return Registry::timestampFactory()->make($timestamp)->format(strtr($format, ['%' => '']));
|
/webtrees/resources/views/lists/ |
H A D | repositories-table.phtml | 74 <td data-sort="<?= $repository->lastChangeTimestamp()->timestamp() ?>">
|
H A D | locations-table.phtml | 93 <td data-sort="<?= $location->lastChangeTimestamp()->timestamp() ?>">
|
H A D | submitters-table.phtml | 93 <td data-sort="<?= $submitter->lastChangeTimestamp()->timestamp() ?>">
|
H A D | media-table.phtml | 121 <td data-sort="<?= $media_object->lastChangeTimestamp()->timestamp() ?>">
|
H A D | notes-table.phtml | 131 <td data-sort="<?= $note->lastChangeTimestamp()->timestamp() ?>">
|
H A D | sources-table.phtml | 154 <td data-sort="<?= $source->lastChangeTimestamp()->timestamp() ?>">
|
H A D | families-table.phtml | 257 <td data-sort="<?= $family->lastChangeTimestamp()->timestamp() ?>">
|
H A D | individuals-table.phtml | 287 <td data-sort="<?= $individual->lastChangeTimestamp()->timestamp() ?>">
|
/webtrees/resources/views/modules/recent_changes/ |
H A D | changes-table.phtml | 91 … <td data-sort="<?= $row->time->timestamp() ?>" class="<?= $show_date ? '' : 'd-none' ?>">
|