라이브러리
[PHP] IntlDateFormatter::getErrorMessage - 마지막 작업의 오류 텍스트를 가져옵니다.
IntlDateFormatter::getErrorMessage
`IntlDateFormatter::getErrorMessage` 메소드는 IntlDateFormatter 객체가 생성되거나 사용할 때 발생하는 오류 메시지를 반환합니다. 이 메소드는 IntlDateFormatter 객체의 오류 메시지를 확인하는 데 사용할 수 있습니다.
# 사용 방법
IntlDateFormatter::getErrorMessage 메소드는 다음과 같이 사용할 수 있습니다.
#hostingforum.kr
php
IntlDateFormatter::getErrorMessage($intlDateFormatter);
# 예제
IntlDateFormatter::getErrorMessage 메소드는 다음과 같이 사용할 수 있습니다.
#hostingforum.kr
php
// IntlDateFormatter 객체 생성
$intlDateFormatter = new IntlDateFormatter('ko_KR', IntlDateFormatter::FULL, IntlDateFormatter::FULL);
// 오류 메시지 확인
echo IntlDateFormatter::getErrorMessage($intlDateFormatter);
# 오류 메시지 확인
IntlDateFormatter::getErrorMessage 메소드는 IntlDateFormatter 객체의 오류 메시지를 반환합니다. 예를 들어, IntlDateFormatter 객체를 생성할 때 언어 코드가 잘못된 경우 오류 메시지가 반환됩니다.
#hostingforum.kr
php
// 오류 메시지 확인
$intlDateFormatter = new IntlDateFormatter('xx_XX', IntlDateFormatter::FULL, IntlDateFormatter::FULL);
echo IntlDateFormatter::getErrorMessage($intlDateFormatter);
# 결과
IntlDateFormatter::getErrorMessage 메소드는 다음과 같이 오류 메시지를 반환합니다.
#hostingforum.kr
Unknown locale: xx_XX
# IntlDateFormatter::getErrorMessage 사용 예제
IntlDateFormatter::getErrorMessage 메소드는 다음과 같이 사용할 수 있습니다.
#hostingforum.kr
php
// IntlDateFormatter 객체 생성
$intlDateFormatter = new IntlDateFormatter('ko_KR', IntlDateFormatter::FULL, IntlDateFormatter::FULL);
// 오류 메시지 확인
echo IntlDateFormatter::getErrorMessage($intlDateFormatter);
// 언어 코드 변경
$intlDateFormatter->setLocale('en_US');
// 오류 메시지 확인
echo IntlDateFormatter::getErrorMessage($intlDateFormatter);
# 결과
IntlDateFormatter::getErrorMessage 메소드는 다음과 같이 오류 메시지를 반환합니다.
#hostingforum.kr
Unknown locale: xx_XX
en_US
IntlDateFormatter::getErrorMessage 메소드는 IntlDateFormatter 객체의 오류 메시지를 반환합니다. 이 메소드는 IntlDateFormatter 객체의 오류 메시지를 확인하는 데 사용할 수 있습니다.
-
- 나우호스팅 @pcs8404
-
호스팅포럼 화이팅!
댓글목록
등록된 댓글이 없습니다.