~xibo-maintainers/xibo/tempel

« back to all changes in this revision

Viewing changes to lib/Service/DateServiceInterface.php

  • Committer: Dan Garner
  • Date: 2016-02-18 16:07:16 UTC
  • mfrom: (454.4.137)
  • Revision ID: git-v1:8867f12675bc9e0e67e7e622c80da7471b9f294a
Merge pull request #139 from dasgarner/feature/nested-display-groups

Feature/nested display groups

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<?php
2
 
/*
3
 
 * Spring Signage Ltd - http://www.springsignage.com
4
 
 * Copyright (C) 2016 Spring Signage Ltd
5
 
 * (DateInterface.php)
6
 
 */
7
 
 
8
 
namespace Xibo\Service;
9
 
 
10
 
/**
11
 
 * Interface DateServiceInterface
12
 
 * @package Xibo\Service
13
 
 */
14
 
interface DateServiceInterface
15
 
{
16
 
    /**
17
 
     * Get a local date
18
 
     * @param int|\Jenssegers\Date\Date $timestamp
19
 
     * @param string $format
20
 
     * @param string $timezone
21
 
     * @return string
22
 
     */
23
 
    public function getLocalDate($timestamp = NULL, $format = NULL, $timezone = NULL);
24
 
 
25
 
 
26
 
    /**
27
 
     * Get the default date format
28
 
     * @return string
29
 
     */
30
 
    public function getSystemFormat();
31
 
 
32
 
    /**
33
 
     * Get Date from String
34
 
     * @param string $string
35
 
     * @param string $format
36
 
     * @return \Jenssegers\Date\Date
37
 
     */
38
 
    public function parse($string = null, $format = null);
39
 
 
40
 
    /**
41
 
     * Set Locale
42
 
     * @param $identifier
43
 
     */
44
 
    public function setLocale($identifier);
45
 
 
46
 
    /**
47
 
     * Timezone identifiers
48
 
     * @return array
49
 
     */
50
 
    public function timezoneList();
51
 
    
52
 
    /**
53
 
     * Extract only a time format from mask
54
 
     * @param $format
55
 
     * @return string
56
 
     */
57
 
    public function extractTimeFormat($format);
58
 
 
59
 
    /**
60
 
     * Converts a format to moment
61
 
     *  inspired by http://stackoverflow.com/questions/30186611/php-dateformat-to-moment-js-format
62
 
     * @param $format
63
 
     * @return string
64
 
     */
65
 
    public function convertPhpToMomentFormat($format);
66
 
 
67
 
    /**
68
 
     * Converts a format to bootstrap date picker
69
 
     *  inspired by http://stackoverflow.com/questions/30186611/php-dateformat-to-moment-js-format
70
 
     * @param $format
71
 
     * @param $includeTime
72
 
     * @return string
73
 
     */
74
 
    public function convertPhpToBootstrapFormat($format, $includeTime = true);
75
 
}
 
 
b'\\ No newline at end of file'