changes for filter and print
This commit is contained in:
89
vendor/ernilambar/nepali-date/composer.json
vendored
89
vendor/ernilambar/nepali-date/composer.json
vendored
@ -1,47 +1,60 @@
|
||||
{
|
||||
"name" : "ernilambar/nepali-date",
|
||||
"description" : "Nepali Date",
|
||||
"keywords" : [ "date" ],
|
||||
"homepage" : "https://github.com/ernilambar/nepali-date",
|
||||
"license" : "MIT",
|
||||
"authors" : [
|
||||
"name": "ernilambar/nepali-date",
|
||||
"description": "Nepali Date",
|
||||
"keywords": [
|
||||
"nepali",
|
||||
"bikram-sambat",
|
||||
"date"
|
||||
],
|
||||
"homepage": "https://github.com/ernilambar/nepali-date",
|
||||
"license": "MIT",
|
||||
"authors": [
|
||||
{
|
||||
"name" : "Nilambar Sharma",
|
||||
"email" : "nilambar@outlook.com",
|
||||
"homepage" : "https://www.nilambar.net",
|
||||
"role" : "Developer"
|
||||
"name": "Nilambar Sharma",
|
||||
"email": "nilambar@outlook.com",
|
||||
"homepage": "https://www.nilambar.net",
|
||||
"role": "Developer"
|
||||
}
|
||||
],
|
||||
"support" : {
|
||||
"issues" : "https://github.com/ernilambar/nepali-date/issues"
|
||||
"support": {
|
||||
"issues": "https://github.com/ernilambar/nepali-date/issues"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Nilambar\\NepaliDate\\": "src/"
|
||||
}
|
||||
},
|
||||
"autoload-dev": {
|
||||
"psr-4": {
|
||||
"Nilambar\\NepaliDate\\Test\\": "tests/"
|
||||
}
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.6"
|
||||
},
|
||||
"config": {
|
||||
"sort-packages": true
|
||||
},
|
||||
"scripts": {
|
||||
"test": "phpunit",
|
||||
"config-cs": [
|
||||
"Dealerdirect\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\Plugin::run",
|
||||
"\"vendor/bin/phpcs\" --config-set default_standard PSR2"
|
||||
"format": [
|
||||
"composer --working-dir=build-cs update --no-interaction",
|
||||
"build-cs/vendor/bin/phpcbf --standard=phpcs.xml.dist"
|
||||
],
|
||||
"post-install-cmd": "@config-cs",
|
||||
"post-update-cmd": "@config-cs",
|
||||
"lint": "\"vendor/bin/phpcs\" . ",
|
||||
"lint-fix": "\"vendor/bin/phpcbf\" . "
|
||||
},
|
||||
"autoload" : {
|
||||
"psr-4": {
|
||||
"Nilambar\\NepaliDate\\": "src/"
|
||||
}
|
||||
},
|
||||
"autoload-dev" : {
|
||||
"psr-4": {
|
||||
"Nilambar\\NepaliDate\\Test\\": "tests/"
|
||||
}
|
||||
},
|
||||
"require" : {
|
||||
"php" : ">=5.6"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "^9",
|
||||
"squizlabs/php_codesniffer": "^3.5",
|
||||
"dealerdirect/phpcodesniffer-composer-installer": "^0.6.2"
|
||||
"format:tests": [
|
||||
"composer --working-dir=build-cs update --no-interaction",
|
||||
"build-cs/vendor/bin/phpcbf --standard=phpcs.tests.xml.dist"
|
||||
],
|
||||
"lint": [
|
||||
"composer --working-dir=build-cs update --no-interaction",
|
||||
"build-cs/vendor/bin/phpcs --standard=phpcs.xml.dist"
|
||||
],
|
||||
"lint:tests": [
|
||||
"composer --working-dir=build-cs update --no-interaction",
|
||||
"build-cs/vendor/bin/phpcs --standard=phpcs.tests.xml.dist"
|
||||
],
|
||||
"test": [
|
||||
"composer --working-dir=build-phpunit update --no-interaction",
|
||||
"build-phpunit/vendor/bin/phpunit --verbose"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
1836
vendor/ernilambar/nepali-date/composer.lock
generated
vendored
1836
vendor/ernilambar/nepali-date/composer.lock
generated
vendored
File diff suppressed because it is too large
Load Diff
23
vendor/ernilambar/nepali-date/phpcs.tests.xml.dist
vendored
Normal file
23
vendor/ernilambar/nepali-date/phpcs.tests.xml.dist
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
<?xml version="1.0"?>
|
||||
<ruleset name="project-default">
|
||||
<description>A custom set of code standard rules to check for tests.</description>
|
||||
|
||||
<!-- Only check the PHP files. -->
|
||||
<arg name="extensions" value="php"/>
|
||||
|
||||
<!-- Check all files in this directory and the directories below it. -->
|
||||
<file>tests/</file>
|
||||
|
||||
<exclude-pattern>*/phpunit.xml*</exclude-pattern>
|
||||
|
||||
<!-- Third-party code -->
|
||||
<exclude-pattern>*/vendor/*</exclude-pattern>
|
||||
|
||||
<!-- For CI, don't fail on warnings -->
|
||||
<config name="ignore_warnings_on_exit" value="1"/>
|
||||
|
||||
<config name="testVersion" value="7.4-"/>
|
||||
|
||||
<!-- Enforce PSR12 standards -->
|
||||
<rule ref="PSR12" />
|
||||
</ruleset>
|
@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Calendar class
|
||||
*
|
||||
@ -103,7 +104,7 @@ class NepaliCalendar
|
||||
78 => array( 2078, 31, 31, 31, 32, 31, 31, 30, 29, 30, 29, 30, 30 ),
|
||||
79 => array( 2079, 31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30 ),
|
||||
80 => array( 2080, 31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 30 ),
|
||||
81 => array( 2081, 31, 31, 32, 32, 31, 30, 30, 30, 29, 30, 30, 30 ),
|
||||
81 => array( 2081, 31, 32, 31, 32, 31, 30, 30, 30, 29, 30, 29, 31 ),
|
||||
82 => array( 2082, 30, 32, 31, 32, 31, 30, 30, 30, 29, 30, 30, 30 ),
|
||||
83 => array( 2083, 31, 31, 32, 31, 31, 30, 30, 30, 29, 30, 30, 30 ),
|
||||
84 => array( 2084, 31, 31, 32, 31, 31, 30, 30, 30, 29, 30, 30, 30 ),
|
||||
@ -411,4 +412,4 @@ class NepaliCalendar
|
||||
return $output;
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
38
vendor/ernilambar/nepali-date/src/NepaliDate.php
vendored
38
vendor/ernilambar/nepali-date/src/NepaliDate.php
vendored
@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Nepali Date class
|
||||
*
|
||||
@ -17,7 +18,6 @@ namespace Nilambar\NepaliDate;
|
||||
*/
|
||||
class NepaliDate
|
||||
{
|
||||
|
||||
/**
|
||||
* NepaliCalendar object.
|
||||
*
|
||||
@ -94,7 +94,7 @@ class NepaliDate
|
||||
*/
|
||||
public function getFormattedDate($date, $format)
|
||||
{
|
||||
return strtr($format, $date);
|
||||
return strtr($format, $date);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -158,9 +158,11 @@ class NepaliDate
|
||||
);
|
||||
|
||||
if (is_array($temp_date) && ! empty($temp_date)) {
|
||||
if (intval($y) === intval($temp_date['year'])
|
||||
if (
|
||||
intval($y) === intval($temp_date['year'])
|
||||
&& intval($m) === intval($temp_date['month'])
|
||||
&& intval($d) === intval($temp_date['day'])) {
|
||||
&& intval($d) === intval($temp_date['day'])
|
||||
) {
|
||||
$output = $temp_date;
|
||||
}
|
||||
}
|
||||
@ -176,9 +178,11 @@ class NepaliDate
|
||||
);
|
||||
|
||||
if (is_array($temp_date) && ! empty($temp_date)) {
|
||||
if (intval($y) === intval($temp_date['year'])
|
||||
if (
|
||||
intval($y) === intval($temp_date['year'])
|
||||
&& intval($m) === intval($temp_date['month'])
|
||||
&& intval($d) === intval($temp_date['day'])) {
|
||||
&& intval($d) === intval($temp_date['day'])
|
||||
) {
|
||||
$output = $temp_date;
|
||||
}
|
||||
}
|
||||
@ -344,38 +348,38 @@ class NepaliDate
|
||||
$output = array(
|
||||
'1' => array(
|
||||
'en' => 'Baishakh',
|
||||
'np' => 'बैसाख',
|
||||
'np' => 'वैशाख',
|
||||
),
|
||||
'2' => array(
|
||||
'en' => 'Jeth',
|
||||
'en' => 'Jestha',
|
||||
'np' => 'जेठ',
|
||||
),
|
||||
'3' => array(
|
||||
'en' => 'Ashar',
|
||||
'en' => 'Ashadh',
|
||||
'np' => 'असार',
|
||||
),
|
||||
'4' => array(
|
||||
'en' => 'Shrawan',
|
||||
'np' => 'श्रावन',
|
||||
'np' => 'साउन',
|
||||
),
|
||||
'5' => array(
|
||||
'en' => 'Bhadra',
|
||||
'np' => 'भाद्र',
|
||||
'np' => 'भदौ',
|
||||
),
|
||||
'6' => array(
|
||||
'en' => 'Ashoj',
|
||||
'en' => 'Ashwin',
|
||||
'np' => 'असोज',
|
||||
),
|
||||
'7' => array(
|
||||
'en' => 'Kartik',
|
||||
'np' => 'कार्तिक',
|
||||
'np' => 'कात्तिक',
|
||||
),
|
||||
'8' => array(
|
||||
'en' => 'Mangshir',
|
||||
'en' => 'Mangsir',
|
||||
'np' => 'मंसिर',
|
||||
),
|
||||
'9' => array(
|
||||
'en' => 'Poush',
|
||||
'en' => 'Paush',
|
||||
'np' => 'पुष',
|
||||
),
|
||||
'10' => array(
|
||||
@ -384,11 +388,11 @@ class NepaliDate
|
||||
),
|
||||
'11' => array(
|
||||
'en' => 'Falgun',
|
||||
'np' => 'फाल्गुण',
|
||||
'np' => 'फागुन',
|
||||
),
|
||||
'12' => array(
|
||||
'en' => 'Chaitra',
|
||||
'np' => 'चैत्र',
|
||||
'np' => 'चैत',
|
||||
),
|
||||
);
|
||||
|
||||
|
Reference in New Issue
Block a user