Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package org.dynjs.runtime.builtins.types.date.prototype;
 
 
 public class GetUTCDay extends AbstractDateFunction {
    public GetUTCDay(GlobalObject globalObject) {
        super(globalObject);
    }
    @Override
    public Object call(ExecutionContext contextObject selfObject... args) {
        if ( ! ( self instanceof DynDate ) ) {
            throw new ThrowExceptioncontextcontext.createTypeError"getUTCDay() may only be used with Dates" ) );
        }
        
        DynDate date = (DynDateself;
        
        if ( date.isNaN() ) {
            return .;
        }
        
        long t = date.getTimeValue();
        return (longweekdayt );
    }
New to GrepCode? Check out our FAQ X