001    /**
002     * Implements the Cold Fusion Function getnumericdate
003     */
004    package railo.runtime.functions.other;
005    
006    import railo.runtime.PageContext;
007    import railo.runtime.exp.PageException;
008    import railo.runtime.ext.function.Function;
009    import railo.runtime.op.Caster;
010    import railo.runtime.type.dt.DateTime;
011    
012    public final class GetNumericDate implements Function {
013            public static double call(PageContext pc , Object object) throws PageException {
014            DateTime date = Caster.toDate(object,true,pc.getTimeZone(),null);
015            if(date==null) date=Caster.toDate(object,pc.getTimeZone());
016            
017                    return date.toDoubleValue();
018            }
019    }