https://github.com/dbtek/showdown-date
Showdown date extension. Provides date and time usage in markdown.
https://github.com/dbtek/showdown-date
Last synced: about 2 months ago
JSON representation
Showdown date extension. Provides date and time usage in markdown.
- Host: GitHub
- URL: https://github.com/dbtek/showdown-date
- Owner: dbtek
- License: mit
- Created: 2014-04-21T11:06:09.000Z (about 12 years ago)
- Default Branch: master
- Last Pushed: 2015-07-04T00:27:07.000Z (almost 11 years ago)
- Last Synced: 2025-11-15T03:38:27.096Z (7 months ago)
- Language: JavaScript
- Size: 144 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Showdown Date Extension
=======================
Date extension for Showdown. Provides date and time usage in markdown.
- ```@year``` generates: ```2014``` via js ```new Date().getFullYear()```.
- ```@date``` generates: ```4/21/2014``` via js ```new Date().getLocaleDateString()```.
- ```@dateTime``` generates: ```4/21/2014 2:01:57 PM``` via js ```new Date().getLocaleString()```.
- ```@time``` generates: ```2:01:57 PM``` via js ```new Date().getLocaleTimeString()```.
## Install
```bower install showdown-date```
## Usage
```html
```
```js
var converter = new Showdown.converter({ extensions: ['date'] });
alert(converter.makeHtml('@date'));
alert(converter.makeHtml('@year'));
```