-
Notifications
You must be signed in to change notification settings - Fork 0
/
ConfigTimestampFormat.php
43 lines (30 loc) · 1.38 KB
/
ConfigTimestampFormat.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<?php
require_once __DIR__ . '/../vendor/autoload.php';
use Macocci7\PhpPhotoGps\PhotoGps;
$filename = 'img/with_gps.jpg';
$pg = new PhotoGps($filename);
echo "[" . $filename . "]--------------------\n";
// Format: default
echo "Current format [eng]: " . $pg->lang('eng')->timestampFormat() . "\n";
echo "Current format [ja]: " . $pg->lang('ja')->timestampFormat() . "\n\n";
// Timestamp: default format
echo "Timestamp [eng]: " . $pg->lang('eng')->timestamp() . "\n";
echo "Timestamp [ja]: " . $pg->lang('ja')->timestamp() . "\n\n";
// Configure Format: eng
$pg->lang('eng')->timestampFormat('g:i a');
// Current Format
echo "Current format [eng]: " . $pg->lang('eng')->timestampFormat() . "\n";
echo "Current format [ja]: " . $pg->lang('ja')->timestampFormat() . "\n\n";
// Timestamp: Current Format
echo "Timestamp [eng]: " . $pg->lang('eng')->timestamp() . "\n";
echo "Timestamp [ja]: " . $pg->lang('ja')->timestamp() . "\n\n";
// Configure Format: ja
$pg->lang('ja')->timestampFormat('G時i分s秒');
// Reset Format: eng
$pg->lang('eng')->resetTimestampFormat();
// Current Format
echo "Current format [eng]: " . $pg->lang('eng')->timestampFormat() . "\n";
echo "Current format [ja]: " . $pg->lang('ja')->timestampFormat() . "\n\n";
// Timestamp: Current Format
echo "Timestamp [eng]: " . $pg->lang('eng')->timestamp() . "\n";
echo "Timestamp [ja]: " . $pg->lang('ja')->timestamp() . "\n\n";