PHP Classes

File: infrastructure/libraries/Moment/Locales/cs_CZ.php

Recommend this page to a friend!
  Classes of Maicon gonçalez   Potato Service   infrastructure/libraries/Moment/Locales/cs_CZ.php   Download  
File: infrastructure/libraries/Moment/Locales/cs_CZ.php
Role: Auxiliary script
Content type: text/plain
Description: Auxiliary script
Class: Potato Service
Framework that extracts route details from classes
Author: By
Last change:
Date: 1 year ago
Size: 3,955 bytes
 

Contents

Class file image Download
<?php

// locale: Czech (Czech Republic) (cs_CZ)
// author: Jan Ptacek https://github.com/ptica

use Moment\Moment;

/**
 * @param string $direction
 * @param string $trueString
 * @param string $falseString
 *
 * @return string
 */
$ifPast = function ($direction, $trueString, $falseString)
{
    return
$direction === 'past' ? $trueString : $falseString;
};

/**
 * @param int $count
 * @param int $countSmallerThan
 * @param string $trueString
 * @param string $falseString
 *
 * @return string
 */
$ifCountSmaller = function ($count, $countSmallerThan, $trueString, $falseString)
{
    return
$count < $countSmallerThan ? $trueString : $falseString;
};

return array(
   
"months" => explode('_', 'ledna_února_b?ezna_dubna_kv?tna_?ervna_?ervence_srpna_zá?í_?íjna_listopadu_prosince'),
   
"monthsShort" => explode('_', 'Led_Úno_B?e_Dub_Kv?_?er_?vc_Srp_Zá?_?íj_Lis_Pro'),
   
"weekdays" => explode('_', 'pond?lí_úterý_st?eda_?tvrtek_pátek_sobota_ned?le'),
   
"weekdaysShort" => explode('_', 'po_út_st_?t_pá_so_ne'),
   
"calendar" => array(
       
"sameDay" => '[dnes]',
       
"nextDay" => '[zítra]',
       
"lastDay" => '[v?era]',
       
"lastWeek" => '[minulý] l',
       
"sameElse" => 'l',
       
"withTime" => '[v] H:i',
       
"default" => 'd.m.Y',
    ),
   
"relativeTime" => array(
       
"future" => 'za %s',
       
"past" => 'p?ed %s',
       
"s" => function ($count, $direction, Moment $m) use ($ifPast)
        {
            return
$ifPast($direction, 'okam?ikem', 'okam?ik');
        },
       
"ss" => function ($count, $direction, Moment $m) use ($ifPast)
        {
            return
$ifPast($direction, 'okam?ikem', 'okam?ik');
        },
       
"m" => function ($count, $direction, Moment $m) use ($ifPast)
        {
            return
$ifPast($direction, 'minutou', 'minutu');
        },
       
"mm" => function ($count, $direction, Moment $m) use ($ifPast, $ifCountSmaller)
        {
            return
$ifPast($direction, '%d minutami', $ifCountSmaller($count, 5, '%d minuty', '%d minut'));
        },
       
"h" => function ($count, $direction, Moment $m) use ($ifPast, $ifCountSmaller)
        {
            return
$ifPast($direction, 'hodinou', 'hodinu');
        },
       
"hh" => function ($count, $direction, Moment $m) use ($ifPast, $ifCountSmaller)
        {
            return
$ifPast($direction, '%d hodinami', $ifCountSmaller($count, 5, '%d hodiny', '%d hodin'));
        },
       
"d" => function ($count, $direction, Moment $m) use ($ifPast)
        {
            return
$ifPast($direction, 'dnem', 'den');
        },
       
"dd" => function ($count, $direction, Moment $m) use ($ifPast, $ifCountSmaller)
        {
            return
$ifPast($direction, '%d dny', $ifCountSmaller($count, 5, '%d dny', '%d dn?'));
        },
       
"M" => function ($count, $direction, Moment $m) use ($ifPast)
        {
            return
$ifPast($direction, 'm?sícem', 'm?síc');
        },
       
"MM" => function ($count, $direction, Moment $m) use ($ifPast, $ifCountSmaller)
        {
            return
$ifPast($direction, '%d m?síci', $ifCountSmaller($count, 5, '%d m?síce', '%d m?síc?'));
        },
       
"y" => function ($count, $direction, Moment $m) use ($ifPast)
        {
            return
$ifPast($direction, 'rokem', 'rok');
        },
       
"yy" => function ($count, $direction, Moment $m) use ($ifPast, $ifCountSmaller)
        {
            return
$ifPast($direction, $ifCountSmaller($count, 5, '%d roky', '%d lety'), $ifCountSmaller($count, 5, '%d roky', '%d let'));
        },
    ),
   
"ordinal" => function ($number)
    {
        return
$number . '.';
    },
   
"week" => array(
       
"dow" => 1, // Monday is the first day of the week.
       
"doy" => 4 // The week that contains Jan 4th is the first week of the year.
   
),
);