Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/sky93/ezdate
Browse files Browse the repository at this point in the history
  • Loading branch information
sky93 committed Dec 14, 2016
2 parents b17efb6 + 30d1dee commit 2804fb9
Showing 1 changed file with 36 additions and 1 deletion.
37 changes: 36 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,40 @@ into something like this:
<time class="ezdate" datetime="10/18/1993">26/7/1372</time>
```

##Options
####`persianNumber` (_default: `false`_)

Enjoy using ezdate!
```javascript
$("time.ezdate").ezdate({
persianNumber: true
});
````
Turns:
```html
<time class="ezdate" datetime="10/18/1993">October 18, 1993</time>
```
into
```html
<time class="ezdate" datetime="10/18/1993">۲۶/۷/۱۳۷۲</time>
```

---
####`attrName` (_default: `'data-datetime'`_)
Date source attribute. It's recommended to use `data-datetime` for ezdate as it's HTML5 friendly too.

---
####`dateFormat` (_default: `D/M/YYYY`_)
You can use your custom date format to show.

*Some examples:*

| Value | Meaning |
|---------------|--------------|
| `D/M/YYYY` | 26/7/1372 |
| `D/MM/YYYY` | 26/07/1372 |
| `DD/MMM/YYYY` | 26/مهر/1372 |

---
ezdate also calls `complete` function when finished its job as callback.

Enjoy using ezdate!

0 comments on commit 2804fb9

Please sign in to comment.