【问题标题】:How to format date to German in AngularJS?如何在AngularJS中将日期格式化为德语?
【发布时间】:2016-03-31 21:08:53
【问题描述】:

如何在 AngularJS 中将日期 (EEEE) 转换为德语?示例:星期一到蒙塔格

我的代码:

<div class="item item-divider">{{item.date | date:"EEEE dd.MM.yyyy"}} {{item.hours}}</div>

谢谢。

【问题讨论】:

标签: angularjs date localization format


【解决方案1】:

一种方法是包含适当的语言环境脚本:

<html ng-app>
 <head>
   …
   <script src="angular.js"></script>
   <!-- add this line: -->
   <script src="i18n/angular-locale_de-de.js"></script>
   …
 </head>
</html>

更多信息在这里:

https://docs.angularjs.org/guide/i18n

【讨论】:

    猜你喜欢
    • 2015-06-24
    • 1970-01-01
    • 2014-04-18
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-12-10
    • 2019-09-15
    相关资源
    最近更新 更多