0

I am new to angularjs i am using bootstrap date picker for calculating leaves and I have to calculate number of days between 2 dates and i have to exclude holidays date(array),from number of days which i get from back end. i calculated number of days and now i have to exclude a holiday date in between 2 dates,

Example: from date - 01-10-2015, To date - 05-10-2015, No of days- 5 //but 02-10-2015 is holiday so, i have to get 4

i have taken in between dates of from and to dates as array in this format(mon 01 2015,tue 02 2015,wed 01 2015) i have to change the date format to 02-10-2015(dd-mm-yyyy) how can i do? Thanks in advance

2 Answers 2

1

Just do it as

<p ng-bind="date | date:'MM-dd-yyyy'"></p>

will produce date as 12-19-2015

date is variable you will bind from controller to view.

Sign up to request clarification or add additional context in comments.

Comments

1

It has built in function for this

<p ng-bind="date | date:'MM/dd/yyyy'"></p>

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.