Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • Javascript The getFullYear() Method

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 262
    Comment on it

    Basically in Javascript getFullYear( ) method is used to return the full year based on the local time .Use this method instead of getYear( ) method .
    Syntax ->

    year.getFullYear(); // None parameter 
    

    Return ->
    It return an absolute four digit number for example 2015 ,2000
    Note -> Use this function ,when a year is compliant years after 2000 .

    Example ->

    var todaydate = new Date();
    var currentyear = today.getFullYear(); // return 16/10/2015
    

    In this Date() object is mandatory ,because it is used to containing current date .

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: