Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- currentMonth = getCurrentMonth();
- actualDateWithZero = appendMonthWithZero();
- docs = getFlightResults();
- monthsArray = ['Jan', 'Feb', 'Mar'.......];
- for(count = 0; count < 12; count++)
- {
- outboundMonth = subString(doc[count+1].getOutboundMonth());
- //If we get past December onto a new year we need to reset the current month back to 01
- if(currentMonth + count > 12)
- {
- //e.g. 9 + 4 = 13, 13 - 12 = 1 (January). Or 9 + 11 = 20, 20 - 12 = 8 (August)
- currentMonth = (currentMonth + count) - 12;
- if(currentMonth < 10)
- {
- currentMonth = appendMonthWithZero();
- }
- }
- if(currentMonth + count == outboundBoundMonth || currentMonth == outboundMonth)
- {
- //Get rest of data from doc etc etc
- //Set up divs etc etc
- //Get string month with displayed Month [Jan, Feb, Mar....]
- }
- else
- {
- //display price not available
- //Get string month with displayed Month [Jan, Feb, Mar....]
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement