mirror of
https://github.com/openharmony/third_party_jsframework.git
synced 2026-07-19 14:33:33 -04:00
!203 add Class TimeZone
Merge pull request !203 from sunyaozu/OpenHarmony-3.1-Release
This commit is contained in:
@@ -92,6 +92,11 @@ export function mockI18N() {
|
||||
" may be different from that on a real device.")
|
||||
return BreakIteratorMock;
|
||||
},
|
||||
getTimeZone: function(...args) {
|
||||
console.warn("I18N.getTimeZone interface mocked in the Previewer. How this interface works on the Previewer" +
|
||||
" may be different from that on a real device.")
|
||||
return TimeZoneMock;
|
||||
},
|
||||
Util: {
|
||||
unitConvert: function(...args) {
|
||||
console.warn("I18N.Util.unitConvert interface mocked in the Previewer. How this interface works on the Previewer" +
|
||||
@@ -309,5 +314,27 @@ export function mockI18N() {
|
||||
return paramMock.paramStringMock;
|
||||
}
|
||||
}
|
||||
const TimeZoneMock = {
|
||||
getID: function() {
|
||||
console.warn("I18N.TimeZone.getID interface mocked in the Previewer. How this interface works on the Previewer" +
|
||||
" may be different from that on a real device.")
|
||||
return paramMock.paramStringMock;
|
||||
},
|
||||
getDisplayName: function(...args) {
|
||||
console.warn("I18N.TimeZone.getDisplayName interface mocked in the Previewer. How this interface works on the Previewer" +
|
||||
" may be different from that on a real device.")
|
||||
return paramMock.paramStringMock;
|
||||
},
|
||||
getRawOffset: function() {
|
||||
console.warn("I18N.TimeZone.getRawOffset interface mocked in the Previewer. How this interface works on the Previewer" +
|
||||
" may be different from that on a real device.")
|
||||
return paramMock.paramNumberMock;
|
||||
},
|
||||
getOffset: function(...args) {
|
||||
console.warn("I18N.TimeZone.getOffset interface mocked in the Previewer. How this interface works on the Previewer" +
|
||||
" may be different from that on a real device.")
|
||||
return paramMock.paramNumberMock;
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
Reference in New Issue
Block a user