Forum Discussion
Javascript date format dd/mm/yy NOT dd/mm/yyyy - do I need to import a library?
I am developing a software simulation which uses dates/ calendars extensively. (a booking system) Some javascript has already been used in this project, for example system date, year, month, day of the week etc. But I am now at the limit of our in-house knowledge. We specifically need some code for displaying system date in a dd/mm/yy format as opposed to the standard dd/mm/yyyy, as this doesn't match the original piece of software we are simulating. Do I need to pull in a library?? If so which one and how??
I have a few further issues as well - here is the scenario - we are forcing the student to book specific dates as to avoid having to even think about creating a perpetual calendar or limiting the shelf life of the course to a few years for example, but in order to do this I need some way of forcing the year to jump to the following year if the date is past 24/07 for example in any given year ….. as a user cannot book a date in the past - so my question is can I work with a combination of Javascript variables and normal variables - so something like, IF %SystemDate% is greater than or equal to 24/07/%Year% THEN hide text box xyz that contains %Year% and Show text box abc that contains %Yearadd1%??? Well done for following thus far!!! I can't post the file as it is NDA, but I can try and strip it out if necessary for posting.
ANY help super appreciated :)
12 Replies
- AkashajazlynCommunity Member
This is a really helpful thread to get solve my issue. Thanks for creating this