/**
  * @covers jarekkozak\util\CurrencyExchangeNBP::getExRatioTableList
  */
 public function testGetExRatioTableList()
 {
     $moment = new \Moment\Moment();
     $year = '15';
     $moment->format('y');
     $alist = $this->object->getExRatioTableList('a');
     $list = $this->object->getExRatioTableList();
     self::assertTrue(count($alist) > 100);
     self::assertTrue(count($list) > count($alist));
     self::assertContains('a001z' . $year . '01', $alist[0]);
     self::assertContains('c001z' . $year . '01', $list[0]);
 }
示例#2
0
?>
…
                                                    </blockquote>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="timeline_item">
                                            <div class="timeline_icon timeline_icon_warning"><i class="material-icons">&#xE7FE;</i></div>
                                            <div class="timeline_date">
                                                <?php 
$moment = new Moment\Moment();
echo $moment->startOf('month')->addDays(28)->format('d');
?>
 <span><?php 
$moment = new Moment\Moment();
echo $moment->format('M');
?>
</span>
                                            </div>
                                            <div class="timeline_content">
                                                Added to Friends
                                                <div class="timeline_content_addon">
                                                    <ul class="md-list md-list-addon">
                                                        <li>
                                                            <div class="md-list-addon-element">
                                                                <img class="md-user-image md-list-addon-avatar" src="assets/img/avatars/avatar_02_tn.png" alt=""/>
                                                            </div>
                                                            <div class="md-list-content">
                                                                <span class="md-list-heading"><?php 
echo $faker->firstNameFemale;
?>
示例#3
0
<?php

require __DIR__ . '/../vendor/autoload.php';
$twitterCreatedAt = 'Fri Jun 24 17:43:26 +0000 2011';
$m = new \Moment\Moment($twitterCreatedAt);
echo $m->format('U');
                    $m = new \Moment\Moment($releaseDate[0]);
                    ?>

            <div class="collection-book font-mono u-cf">
              <div class="book-image"><a href="<?php 
                    echo get_permalink($book->ID);
                    ?>
"><?php 
                    echo get_the_post_thumbnail($book->ID, 'book-cover');
                    ?>
</a></div>
              <span class="book-date"><a class="color-black" href="<?php 
                    echo get_permalink($book->ID);
                    ?>
"><?php 
                    echo $m->format('M Y');
                    ?>
</a></span>
              <a href="<?php 
                    echo get_permalink($book->ID);
                    ?>
"><?php 
                    echo $book->post_title;
                    ?>
</a>
            </div>
<?php 
                } else {
                    ?>
            <div class="collection-book font-mono u-cf">
              <div class="book-image"><img src="<?php 
  <section id="home-events" class="border-bottom">
    <div class="container">
      <a href="<?php 
    the_permalink();
    ?>
"
        <div class="row">
          <div class="col s-col6 border-left padding-basic">
            <h2 class="rotated-heading"><?php 
    echo __('[:es]Proximo Evento![:en]Upcoming Event!');
    ?>
</h2>
          </div>
          <div class="col s-col5 flex-center padding-basic">
            <h3 class="font-serif font-capitalize"><?php 
    echo $date->format($date_format);
    ?>
</h3>
          </div>
          <div class="col s-col11 border-right flex-center flex-left-align padding-basic">
            <h2><?php 
    the_title();
    ?>
</h2>
          </div>
        </div>
      </a>
    </div>
  </section>
  <?php 
}
示例#6
0
$response['test10.03'] = $m->calendar();
// tomorrow
$m = new \Moment\Moment($date, 'CET');
$response['test10.04'] = $m->addDays(1)->calendar();
$m = new \Moment\Moment($date, 'CET');
$response['test10.05'] = $m->addDays(3)->calendar();
// everything else
$m = new \Moment\Moment($date, 'CET');
$response['test10.06'] = $m->addDays(10)->calendar();
// ------------------------------------------
$date = '20140515T10:15:23';
$m = new \Moment\Moment($date, 'CET');
$response['test11.00'] = $m->format();
foreach (array('minute', 'hour', 'day', 'week', 'month', 'quarter', 'year') as $k => $period) {
    $index = $k + 1;
    $response['test11.0' . $index] = $m->startOf($period)->format();
}
// ------------------------------------------
$date = '20140515T10:15:23';
$m = new \Moment\Moment($date, 'CET');
$response['test12.00'] = $m->format();
foreach (array('minute', 'hour', 'day', 'week', 'month', 'quarter', 'year') as $k => $period) {
    $index = $k + 1;
    $response['test12.0' . $index] = $m->endOf($period)->format();
}
// ############################################
$tmpl = join('', file('test.html'));
foreach ($response as $key => $value) {
    $tmpl = str_replace('{{' . $key . '}}', $value, $tmpl);
}
echo $tmpl;
示例#7
0
    $date = $moment->format('d');
    if ($i < 8) {
        $moment = new Moment\Moment();
        $olderMoment = $moment->subtractDays($i - 1)->format('j M');
    } else {
        $moment = new Moment\Moment();
        $olderMoment = $moment->subtractMonths(rand(1, 4))->subtractDays(rand(1, 30))->format('j M');
    }
    $note_title = $faker->sentence(4);
    ?>
        <?php 
    if ($i == 1) {
        ?>
                    <li class="heading_list"><?php 
        $moment = new Moment\Moment();
        echo $date = $moment->format('F Y');
        ?>
</li>
        <?php 
    } else {
        if ($i == 8) {
            ?>

                                <li class="heading_list">Oldest</li>
        <?php 
        } else {
            ?>
            <li>
                                    <a href="#" class="md-list-content" data-invoice-id="1">
        <?php 
            if (in_array($i, $overdue_array)) {
                                </div>
                            </li>
<?php 
}
?>
                        </ul>
                    </div>
                    <div class="md-card-list">
                        <div class="md-card-list-header heading_list">This Month</div>
                        <ul class="hierarchical_slide">
<?php 
$moment = new Moment\Moment();
$date_month = $moment->format('M');
$date_month_day_array = [];
$moment = new Moment\Moment();
$date_month_s1d = $moment->format('j') - 1;
for ($i = 0; $i < 15; $i++) {
    $date_month_day = rand(1, $date_month_s1d);
    $date_month_day_array[] = $date_month_day;
}
sort($date_month_day_array, SORT_NUMERIC);
$arr_reversed = array_reverse($date_month_day_array);
for ($i = 0; $i < 15; $i++) {
    $randImg = rand(1, 10);
    $randAvatar = [0, 1];
    $randSenderArr = [$faker->email, $faker->name];
    $randSender = $randSenderArr[array_rand($randSenderArr)];
    $reply_rand = rand(1, 3000);
    ?>
                            <li>
                                <div class="md-card-list-item-menu" data-uk-dropdown="{mode:'click',pos:'bottom-right'}">
?>

    <div id="page_content">
        <div id="page_content_inner">

            <div class="uk-width-medium-8-10 uk-container-center reset-print">

                <div class="uk-grid uk-grid-collapse" data-uk-grid-margin>
                    <div class="uk-width-large-3-10 hidden-print uk-visible-large">
                        <div class="md-list-outside-wrapper">
                            <ul class="md-list md-list-outside notes_list" id="notes_list">
<?php 
$note_id = array('', '', '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');
for ($i = 1; $i <= 28; $i++) {
    $moment = new Moment\Moment();
    $date = $moment->format('d M Y');
    $note_title = $faker->sentence(4);
    ?>
            <?php 
    if ($i == 1) {
        ?>

                                <li class="heading_list uk-text-danger">Important Notes</li>
            <?php 
    } elseif ($i == 12) {
        ?>

                                <li class="heading_list">Other Notes</li>
            <?php 
    } else {
        ?>
示例#10
0
<?php

/**
 * Created by PhpStorm.
 * User: goptarev
 * Date: 25.01.16
 * Time: 16:49
 */
require './vendor/fightbulc/moment/src/MomentLocale.php';
require './vendor/fightbulc/moment/src/Moment.php';
$m = new \Moment\Moment();
// default is "now" UTC
echo $m->format();
// e.g. 2012-10-03T10:00:00+0000
phpinfo();
示例#11
0
                        <a href="#">jQuery</a>
                    </li>
                </ul>
            </div>
        </div>
    </div>

    <div id="page_content">
        <div id="page_content_inner">

            <div class="uk-width-large-8-10 uk-container-center">
                <div id="snippets">
                    <div class="uk-grid uk-grid-small uk-grid-width-1 uk-grid-width-medium-1-2 uk-grid-width-large-1-2 uk-grid-width-xlarge-1-3 hierarchical_show" data-uk-grid="{ gutter: 16, controls: '#snippets_grid_filter' }">
<?php 
$moment = new Moment\Moment();
$date_month = $moment->format('M Y');
$snippets_data_file = file_get_contents('data/snippets.json');
$snippets_data = json_decode($snippets_data_file, true);
$snippets_length = count($snippets_data);
for ($i = 0; $i < $snippets_length; $i++) {
    $lang = $snippets_data[$i]['language'];
    $title = $snippets_data[$i]['title'];
    $content = $snippets_data[$i]['content'];
    ?>
                        <div data-uk-filter="snippets-lang-<?php 
    echo $lang;
    ?>
">
                            <div class="md-card md-card-hover md-card-overlay" data-snippet-title="<?php 
    echo $title;
    ?>
示例#12
0
// ------------------------------------------
$m = new \Moment\Moment('2013-02-01T07:00:00');
$result = $m->fromNow();
$response['test05.01'] = $result->getSeconds();
$response['test05.02'] = $result->getMinutes();
$response['test05.03'] = $result->getHours();
$response['test05.04'] = $result->getDays();
$response['test05.05'] = $result->getWeeks();
// ------------------------------------------
$m = new \Moment\Moment('2012-04-25T03:00:00', 'CET');
$response['test06.01'] = $m->format();
$response['test06.02'] = $m->setTimezone('UTC')->format();
// ------------------------------------------
$m = new \Moment\Moment('2012-04-25T03:00:00', 'CET');
$response['test07'] = $m->format('l, dS F Y / H:i (e)');
// ------------------------------------------
$m = new \Moment\Moment('2012-04-25T03:00:00', 'CET');
$momentPeriodVo = $m->getPeriod('week');
$response['test08.01'] = $momentPeriodVo->getStartDate()->format('Y-m-d');
$response['test08.02'] = $momentPeriodVo->getEndDate()->format('Y-m-d');
$response['test08.03'] = $momentPeriodVo->getRefDate()->format('Y-m-d');
// ------------------------------------------
$m = new \Moment\Moment('2012-04-25T03:00:00', 'CET');
$response['test09.01'] = $m->format('l, F jS Y g:i A');
$response['test09.02'] = $m->format('LLLL', new \Moment\CustomFormats\MomentJs());
// ############################################
$tmpl = join('', file('test.html'));
foreach ($response as $key => $value) {
    $tmpl = str_replace('{{' . $key . '}}', $value, $tmpl);
}
echo $tmpl;