鐜板湪鏄�2019骞�12鏈�1鏃�0鐐�27鍒嗭紝鎴戠殑蹇冩儏渚濇棫闅句互骞抽潤銆傝繖涓湀鏄�2019骞寸殑鏈�鍚庝竴涓湀锛屾槸21涓栫邯10骞翠唬鐨勬渶鍚庝竴涓湀锛屼篃鏄涓�鎵�90鍚�30宀佷互鍓嶇殑鏈�鍚庝竴涓湀銆傚氨鏄湪杩欎釜鏈堢殑绗竴澶╃殑0鐐�0鍒嗭紝鎴戝啓鐨勪唬鐮佸嚭浜嗕竴涓猙ug锛岀畝鐩磋鎴戞鍝棤娉��
浜嬫儏鏄繖鏍风殑锛屾垜浠叕鍙稿湪鍙屽崄涓�鎼炰簡涓績閿�娲诲姩锛屾椂闂存槸11鏈�1鏃ュ埌12鏈�1鏃�0鐐规暣銆備负浜嗕繚璇佸湪2019-12-01 0鐐规椂锛屾墍鏈夊皬绋嬪簭涓婂弻鍗佷竴鐩稿叧鐨刄I鍏冪礌鍑嗘椂涓嬫灦锛屾垜鍐欎笅浜嗗涓嬩唬鐮侊細
// 鏌ュ嚭12鏈�1鏃ョ殑鏃堕棿鎴�
new Date('2019-12-01').getTime() //鎴朌ate.parse('2019-12-01') 1575158400000
const isS11 = Date.now() < 1575158400000
涓�鍒囩殑UI鍏冪礌閮藉皢鏍规嵁杩欎釜isS11
杩欎釜甯冨皵鍊艰繘琛屾樉绀哄拰闅愯棌銆傛垜鎻愬墠鎶婇�昏緫鍐欏ソ涔嬪悗锛屾棭鏃╁氨鍙戝竷鍒扮嚎涓娿�傚懆浜旇繍钀ョ殑鍚屼簨闂捣鏃惰繕寰楀埌鎴戜俊瑾撴棪鏃︾殑淇濊瘉锛屾垜璇达紝鑲畾娌¢棶棰橈紝鎴戦兘瀹夋帓濂戒簡锛�0鐐逛繚璇佷笅鏋躲��
0鐐圭殑閽熷0鏁插搷浜嗐�傝�佹澘鍦ㄧ兢閲屽彂浜嗙孩鍖咃紝鎴戞姠杩囦簡涔嬪悗锛屾墦寮�灏忕▼搴忥紝鐪嬬湅鍙屽崄涓�鏄笉鏄笅绾夸簡銆傛剰澶栬繕鏄嚭涔庢剰鏂欑殑鍙戠敓浜嗭紝鍏冪礌杩樺湪锛侊紒鎴戞湁鐐规厡浜嗚捣鏉ワ紝鍙堝皾璇曚簡鍒锋柊鍜岄噸鏂版墦寮�灏忕▼搴忥紝鍙屽崄涓�渚濈劧杩樺湪锛岀汗涓濅笉鍔ㄣ�傛垜灏辫寰楄劯鏈夌偣鐏荆杈g殑鈥斺�旀墦鑴镐簡锛�
鎴戦┈涓婃墦寮�vscode锛屾煡鎵惧師鍥狅紝鍦ㄦ帶鍒跺彴鍐欎笅涓嬮潰鐨勪唬鐮侊細
绾冲凹锛熶负浠�涔堟槸鏃╀笂8鐐癸紵锛燂紵涓嶅簲璇ユ槸榛樿0鐐瑰悧锛熶笉绠′簡锛屽厛鏀规鍐嶈锛屼簬鏄姞涓婃椂鍒嗙锛�
const isS11 = Date.now() < Date.parse('2019-12-01 00:00')
杩欏洖姝e父浜嗐�傝刀绱х揣鎬ユ彁浜や竴涓増鏈厛锝炴彁浜ゅ畬涔嬪悗寮�濮嬬炕TC39鐨勮鑼冿細缁堜簬鍦ㄨ繖閲屾壘鍒颁簡瑙i噴銆傚綋Date鏋勯�犲嚱鏁版帴鍙椾竴涓瓧绗︿覆浣滀负鍙傛暟鏃讹紝浼氳皟鐢―ate.parse鏉ュ緱鍒版椂闂存埑銆傝�屽湪Date.parse涓湁杩欎箞涓�娈佃瘽锛�
When the UTC offset representation is absent, date-only forms are interpreted as a UTC time and date-time forms are interpreted as a local time.
缈昏瘧杩囨潵灏辨槸锛氬綋瀛楃涓蹭腑娌℃湁UTC鐨勬爣璁版椂锛屽彧鏈夋棩鏈熺殑瀛楃涓蹭細琚綋鎴怳TC鏃堕棿鏉ヨВ鏋愶紝鏈夋棩鏈熷拰鏃堕棿鐨勫瓧绗︿覆浼氳褰撴垚鏈湴鏃堕棿鏉ヨВ鏋愩��
new Date('2019-12-01') //鎸塙TC0鏃跺尯鐨勬椂闂�0鐐癸紝鐩稿綋浜庡寳浜椂闂存棭涓�8鐐�
new Date('2019-12-01 00:00') //鎸夊寳浜椂闂�0鐐�
鎴戜滑鏄笢鍏尯锛屾瘮UTC鏃堕棿蹇�8涓皬鏃躲�傛垜杈撳叆鐨勫瓧绗︿覆鏄�2019-12-01
琚綋鎴怳TC鏃堕棿鐨�12鏈�1鏃�0鐐癸紝鎵�浠ユ崲鎴愭湰鍦版椂闂存槸12鏈�1鏃�8鐐广�傘�傘��
鏈�鍚庯紝棣栧厛鍚愭Ы涓�涓婽C39鍒跺畾瑙勮寖鐨勫ぇ浣滑锛屼负浠�涔堜笉鑳介兘鎸夋湰鍦版椂闂存潵瑙f瀽鍛紵涓嶇劧鎴戜篃涓嶄細鎺夊埌鍧戦噷銆傘�備笉杩囷紝濂藉湪寰俊鍔犳�ュ鏍告晥鐜囬珮锛屽彧鐢ㄥ崐涓皬鏃跺氨瀹℃牳閫氳繃锛堣繖閲岀粰寰俊鐐逛釜璧烉煈嶏級锛屾墠娌″紕涓櫄鑺備笉淇濔煒紙瀹岋級