Let Calendar.class do its magic for you 😉
pCal.set(GregorianCalendar.DAY_OF_WEEK,Calendar.FRIDAY);
pCal.set(GregorianCalendar.DAY_OF_WEEK_IN_MONTH, -1);
More Related Contents:
- How to calculate remaining days of the month? [duplicate]
- How do I calculate someone’s age in Java?
- How to sanity check a date in Java
- Calendar date to yyyy-MM-dd format in java
- How to tackle daylight savings using TimeZone in Java
- Check if a given time lies between two times regardless of date
- Java: How do you convert a UTC timestamp to local time?
- How to subtract X day from a Date object in Java?
- Creating java date object from year,month,day
- System.currentTimeMillis() vs. new Date() vs. Calendar.getInstance().getTime()
- Convert String to Calendar Object in Java
- How to check if a date Object equals yesterday?
- Java Date vs Calendar
- Why does Java’s Date.getYear() return 111 instead of 2011?
- Why does Java’s Date.getYear() return 111 instead of 2011?
- how to add days to java simple date format
- Getting last day of the month in a given string date
- Android Days between two dates
- Java: Get month Integer from Date
- How to sanity check a date in Java
- Sum two dates in Java
- Converting a Date object to a calendar object [duplicate]
- A good date converter for Jalali Calendar in Java? [closed]
- Retrieve current week’s Monday’s date
- Is there a good way to get the date of the coming Wednesday?
- Date object to Calendar [Java]
- java: how to mock Calendar.getInstance()?
- java get the first date and last date of given month and given year [duplicate]
- calculate business days including holidays
- How to save and retrieve Date in SharedPreferences