Article
Change year of a date object
https://cdn.jsdelivr.net/npm/[email protected]/dist/js.cookie.min.js
Copy to clipboard
The date methods setFullYear() method sets the full year for a specified date according to local time: https://raw.githubusercontent.com/finsweet/jqueryCourse/main/jsobjects/ex10.js?actionable=true The new dt value will be Mon Aug 28 2000 23:30:00 GMT+0530 (IndiaStandard Time)
<script>
$(document).ready(function(){
XT1
});
</script>
$(document).ready(function(){
XT1
});
</script>
Copy to clipboard
Live demo
<div id="minidivpage" class="example-live"><div id="resultdiv">.</div></div>
<script>
$(document).ready(function() {
XT1
});
</script>
$(document).ready(function() {
XT1
});
</script>
Copy to clipboard
Press the Run Demo button to execute the scripts above.
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.