Skip to content

Commit

Permalink
to-date-string: add about in ReadMe file
Browse files Browse the repository at this point in the history
  • Loading branch information
Garrison authored and Garrison committed Nov 1, 2023
1 parent 3c9e811 commit dffec7b
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,45 @@ Converting date and time to timestamp and reverse converting
[![Coverage Status](https://coveralls.io/repos/github/GarriGarrison/datetime/badge.svg?branch=main&rand=123)](https://coveralls.io/github/GarriGarrison/datetime?branch=mainr)
![Build Status](https://github.com/GarriGarrison/datetime/actions/workflows/ci.yml/badge.svg)
[![Minified Size](https://img.shields.io/bundlephobia/minzip/%40garrigarrison%2Fdatetime)](https://bundlephobia.com/result?p=@garrigarrison/datetime)

<!-- [![License: MIT](https://img.shields.io/github/license/GarriGarrison/datetime)](https://opensource.org/licenses/MIT) -->

[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

## function toTimestamp

input date format: YYYY-MM-DD, DD.MM.YYYY, hh:mm, YYYY-MM-DDThh:mm, YYYY-MM-DD hh:mm, DD.MM.YYYYThh:mm, DD.MM.YYYY hh:mm
output result timestamp with timezone

## toDateString

input timestamp
output date format DD.MM.YYYY or null

## toISODateString

input timestamp
output date format YYYY-MM-DD or null

## toDateLongString

input timestamp
output date format DD month YYYY or null

## toISOString

input timestamp, withSeconds = true
withSeconds = true (default): output date format YYYY-MM-DDThh:mm:ss or null
withSeconds = false: output date format YYYY-MM-DDThh:mm or null

## toDateTimeString

input timestamp, withSeconds = true
withSeconds = true (default): output date format DD.MM.YYYY hh:mm:ss or null
withSeconds = false: output date format DD.MM.YYYY hh:mm or null

## toTimeString

input timestamp, withSeconds = true
withSeconds = true (default): output date format hh:mm:ss or null
withSeconds = false: output date format hh:mm or null

0 comments on commit dffec7b

Please sign in to comment.