Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package org.dynjs.runtime.builtins.types.date.prototype;
 
 
 public class GetUTCDate extends AbstractDateFunction {
    public GetUTCDate(GlobalContext globalContext) {
        super(globalContext);
    }
    @Override
    public Object call(ExecutionContext contextObject selfObject... args) {
        if ( ! ( self instanceof DynDate ) ) {
            throw new ThrowExceptioncontextcontext.createTypeError"getUTCDate() may only be used with Dates" ) );
        }
        
        DynDate date = (DynDateself;
        
        if ( date.isNaN() ) {
            return .;
        }
        
        long t = date.getTimeValue();
        return (longdateFromTime(t);
    }
    
    @Override
    public void setFileName() {
        this. = "org/dynjs/runtime/builtins/types/date/prototype/GetUTCDate.java";
    }
    @Override
    public void setupDebugContext() {
        this. = "<native function: getUTCDate>";
    }
New to GrepCode? Check out our FAQ X