Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
thebinij authored Feb 17, 2023
1 parent 2c669eb commit 407517a
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,21 @@ yarn add date-convert-ad-bs

## Usage

How to Use
How to Use

#### ES6 Syntax
```javascript
<script>
// ES6 import
import {ADTOBS, BSTOAD} from 'date-convert-ad-bs';
console.log(ADTOBS(2023,5,29)); // ~ 2080-03-15

console.log(ADTOBS(2023,5,29)); // ~ 2080-03-14
console.log(BSTOAD(2080,2,15)); // ~ 2023-06-29
</script>
```

### CommonJS Syntax
```javascript
const converter = require('date-convert-ad-bs');

console.log(converter.ADTOBS(2023,5,29)); // ~ 2080-03-14
console.log(converter.BSTOAD(2080,2,15)); // ~ 2023-06-29
```

0 comments on commit 407517a

Please sign in to comment.