0

I am trying to build a self-depricating schedule. I'm using a framework with no calendar style module.

So I have a field, we'll call it group date, that takes human readable data. So group date could = 01/02/03. The problem is, that this isn't a time stamp, just html.

I need this converted so I can convert the date from 01/02/03 into 030102 so the days section is on the end. Then my if statement will do the same with the current time so I can filter by saying

if the current date is greater than or equal to group date then don't show this item.

Yes, it's a work around but it is the only realistic way I can accomplish this, given the framework.

knocked loose
  • 3,142
  • 2
  • 25
  • 46

1 Answers1

0

Use new Date(year, month, day, hours, secs) to convert.

converted_date = new Date(2003,01,02, 0, 0)
now = new Date()
if(now > converted_date) {
    // don't show
}