day of the week in Java -
this question has answer here:
php has built-in function takes data , returns day of week (monday, tuesday, etc.). java have similar function?
import java.util.*; public class getday { public static void main(string[] args) { calendar calendar = new gregoriancalendar(); calendar.set(2011, 1, 9); // 1 = feb months 0 based remember system.out.println(calendar.get(calendar.day_of_week)); } }
Comments
Post a Comment