namedays-cs
Advanced tools
Comparing version 0.1.2 to 0.1.3
{ | ||
"name": "namedays-cs", | ||
"version": "0.1.2", | ||
"version": "0.1.3", | ||
"author": "Roman Ožana <roman@ozana.cz> (https://ozana.cz)", | ||
@@ -5,0 +5,0 @@ "repository": "OzzyCzech/namedays-cs", |
@@ -13,25 +13,21 @@ # Name Days (cs) | ||
All functions are available in the main module. You can import them like this: | ||
You can import the whole module or just specific functions: | ||
```javascript | ||
import * as namedays from 'namedays-cs'; | ||
import {getNameDay} from 'namedays-cs'; | ||
``` | ||
## Name days | ||
## Getting Name Days | ||
There are basically two functions to get getting name days. | ||
The first one returns a **string** of name days separated by | ||
`a` letter. The second one returns an **array** of name days. | ||
You can get name days for a given date: | ||
```javascript | ||
import {getNameDay, getNameDayArray} from 'namedays-cs'; | ||
import {getNameDay} from 'namedays-cs'; | ||
const date = new Date(2024, 11, 24); // 24. december 2024 | ||
// String of name days | ||
getNameDay(date); // Adam a Eva | ||
getNameDay(date, ', '); // Adam, Eva | ||
// Array of name days | ||
getNameDayArray(date); // ['Adam', 'Eva'] | ||
// Get name days for a given date | ||
getNameDay(date); // ['Adam', 'Eva'] | ||
getNameDay(date).join(' a '); // Adam a Eva | ||
``` | ||
@@ -46,4 +42,3 @@ | ||
getNameDay(date); // '' (empty string) | ||
getNameDayArray(date); // [] (empty array) | ||
getNameDay(date); // [] (empty array) | ||
``` | ||
@@ -50,0 +45,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
14119
50