Skip to content

Commit

Permalink
Added description of backward fiscal year
Browse files Browse the repository at this point in the history
  • Loading branch information
robgallen committed Oct 1, 2015
1 parent 6ff9e66 commit a29d02b
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,19 @@ moment("2013-09-01").fquarter(1).toString();
// Q3 2013
```

## Backwards fiscal year
Some countries begin their fiscal quarters in the previous year, e.g. US Federal govt. where October 2013 is Q1 2014. You can now use a negative starting month to reflect this.
```javascript
moment("2013-01-01").fquarter(-3);
// {quarter:2, year:2013, nextYear:2014}
moment("2013-01-01").fquarter(-3).toString();
// Q2 2013/14
moment("2013-10-01").fquarter(-3);
// {quarter:1, year:2014, nextYear:2015}
moment("2013-10-01").fquarter(-3).toString();
// Q1 2014/15
```

## Changing the quarter initial
```javascript
week: {
Expand Down

0 comments on commit a29d02b

Please sign in to comment.