Project

sass-times

0.0
No commit activity in last 3 years
No release in over 3 years
Sass添加时间戳方法
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies
 Project Readme

sass-times Gem Version

SASS 时间戳方法

安装

gem install sass-times

用法

  1. 添加 require "sass-times" 到sass配置中,如果你使用commpass 可以写入 config.rb 文件中.

  2. 直接在scss文件中以下下几种调用方法

    timestamp()

    /* 完成于 #{timestamp()} */

    输出:

    /* 完成于 2016-07-19 13:01:40 +0800 */

    strftime()

    /* 完成于 #{strftime('%Y-%m-%d')} */

    输出:

    /* 完成于 2016-07-19 */

    unix_timestamp

    /* 完成于 #{unix_timestamp()} */

    输出:

    /* 完成于 1468895660 */

strftime more http://ruby-doc.org/core-2.0.0/Time.html#method-i-strftime