What do you want to save?
Add Code snippet
New code examples
-
-
Javascript 2022-03-16 17:25:31
js display only date
var newDate = new Date(oldDate.toDateString()); Add solution -
Javascript 2022-03-12 02:15:16
javascript strftime
Arguments of toLocaleString method can also configure the format of the dates. This is supported in modern browser versions, you can see more information here:https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toLocaleSt... Add solution -
Java 2022-03-11 08:50:14
how to calculate 30 days from a date in java
package com.mkyong.time; import java.text.DateFormat; import java.text.SimpleDateFormat; import java.util.Calendar; import java.util.Date; public class DateExample { private static final DateFormat dateFormat = new SimpleDateFormat("yyyy/MM/dd... Add solution -
Javascript 2022-03-08 20:25:05
Create a JavaScript Function with the name age () this function will take your date of birth as parameters and return your age in years.
// To calculate age: var year_born = prompt("Please enter your date of birth:", "Type here"); var d = new Date(); var n = d.getFullYear(); function getAge(birthYear){ var currentDate = new Date(); var currentYear = currentDate.get... Add solution -
Javascript 2022-03-08 12:30:11
javascript date custom string format
var date = new Date(Date.UTC(2012, 11, 20, 3, 0, 0, 200)); // request a weekday along with a long date var options = { weekday: 'long', year: 'numeric', month: 'long', day: 'numeric' }; console.log(new Intl.DateTimeFormat('de-DE', options).format(date));... Add solution