Last active
January 18, 2017 08:01
-
-
Save tyoshikawa1106/11242040 to your computer and use it in GitHub Desktop.
Apex : 月初日付と月末日付取得
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 月初日付取得 | |
*/ | |
public static Date getMonthOfStartDay(Date prmDate) { | |
return prmDate != null ? Date.newInstance(prmDate.year(), prmDate.month(), 1) : null; | |
} | |
/** | |
* 月末日付取得 | |
*/ | |
public static Date getMonthOfEndDay(Date prmDate) { | |
return prmDate != null ? Date.newInstance(prmDate.year(), prmDate.month() + 1 ,0) : null; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment