如何用西班牙语翻译日期? [英] How to translate date in spanish?

查看:317
本文介绍了如何用西班牙语翻译日期?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要在此日期转换:1443729984884

I need to convert this date: 1443729984884

在此日期:01 OCTUBRE 2015年22:06

in this date: 01 octubre 2015 22:06

有没有办法在角的过滤器可以做到这一点?

Is there a way to do this with the filters in angular ?

推荐答案

角支持国际化标准位置|全球化|国际化。当谈到格式角数字或日期依赖于 $区域服务。
下面是目前支持的角度位置列表:

Angular supports i18n Standard for location | globalization | internationalization. When it comes to number or date formatting Angular relies on $locale service. Here is the list of locations currently supported by angular:

http://cdnjs.com/libraries/angular-i18n/

下面是关于如何支持西班牙语语言一个例子:

Here is an example on how to support spanish locale:

在线演示

Online Demo

<html ng-app>
 <head>

   <script src="angular.js"></script>
   <script src="i18n/angular-locale_es-es.js"></script>

 </head>
 <body >
     <span ng-non-bindable>{{1443729984884 | date:'dd MMMM yyyy hh:mm'}}</span>:
     <span>{{1443729984884 | date:'dd MMMM yyyy hh:mm'}}</span><br>
</body>
</html>

这篇关于如何用西班牙语翻译日期?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆