Skip to content

Commit

Permalink
Merge branch 'master' of github.com:darwinlouistoledo/Petsa
Browse files Browse the repository at this point in the history
  • Loading branch information
darwinlouistoledo committed Mar 13, 2018
2 parents b057ac8 + df305bb commit 45da35a
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ repositories {
dependencies {
...
compile 'me.darwinlouistoledo:petsa:1.0'
compile 'me.darwinlouistoledo:petsa:1.2'
...
}
Expand All @@ -26,32 +26,31 @@ Here are sample usage of the library. The `fomat()` method will return a String

```java
Petsa.with(new Date())
.toFormat("MM/dd/yyyy").format();

.toPattern("MM/dd/yyyy").format();
```

```java
Petsa.with(System.currentTimeMillis())
.toFormat("dd/MM/yyyy HH:mm")
.toPattern("dd/MM/yyyy HH:mm")
.format();
```

```java
Petsa.with("03/09/2018")
.fromFormat("MM/dd/yyyy")
.toFormat("MMMM dd, yyyy")
.fromPattern("MM/dd/yyyy")
.toPattern("MMMM dd, yyyy")
.format();
```

```java
Petsa.with(System.currentTimeMillis())
.toFormat("hh:mm aa")
.toPattern("hh:mm aa")
.format();
```

```java
Petsa.with(System.currentTimeMillis())
.toFormat("MMMM dd, yyyy hh:mm aa")
.toPattern("MMMM dd, yyyy hh:mm aa")
.locale(Locale.JAPAN)
.format();
```
Expand Down

0 comments on commit 45da35a

Please sign in to comment.