Timecopでstrptimeを使った時の挙動の話
Timecopをgemで取り込んでからどうもstrptimeの挙動がおかしい。 現象としては古い年月だとずれた時間が返されてしまうのだ
通常時
Date.strptime("1500-10-10").strftime("%Y-%m-%d")
=> "1500-10-10"
Timecopでstrptimeを使った時の挙動の話
Timecopをgemで取り込んでからどうもstrptimeの挙動がおかしい。 現象としては古い年月だとずれた時間が返されてしまうのだ
通常時
Date.strptime("1500-10-10").strftime("%Y-%m-%d")
=> "1500-10-10"
require 'formula' | |
class Solr < Formula | |
homepage 'http://lucene.apache.org/solr/' | |
url 'http://www.apache.org/dyn/closer.cgi/lucene/solr/4.7.0/solr-4.7.0.tgz' | |
sha1 '5599a33f6d7c46251d87ff226709e759572ade4b' | |
def script; <<-EOS.undent | |
#!/bin/sh | |
if [ -z "$1" ]; then |
Tail = require('tail').Tail; | |
var path = require("path") | |
var filename = path.resolve(process.argv[2]); | |
tail = new Tail(filename); | |
tail.on("line", function(data) { | |
try{ | |
var parsed = JSON.parse(data) | |
console.log(JSON.stringify(parsed, null, " ")) | |
}catch(e){ |
module.exports = (grunt) -> | |
require('load-grunt-tasks')(grunt) | |
grunt.initConfig | |
compass : | |
dist: | |
options: | |
debugInfo : true | |
bundleExec: true | |
app: "rails" |
<link rel="import" href="../components/polymer/polymer.html"> | |
<polymer-element name="my-element"> | |
<template> | |
<style> | |
:host { | |
position: absolute; | |
width: 100%; | |
height: 100%; |
class HeaderPagingLayout : UICollectionViewFlowLayout{ | |
let velocityThreshold : CGFloat = 0.1 | |
func proposedAttributes() -> [UICollectionViewLayoutAttributes]{ | |
if let proposedRect = self.collectionView?.bounds{ | |
return self.layoutAttributesForElementsInRect(proposedRect) as? [UICollectionViewLayoutAttributes] ?? [] | |
} | |
return [] | |
} | |
// ---- | |
// Sass (v3.3.14) | |
// Compass (v1.0.1) | |
// ---- | |
$color-palette :( | |
red : ( | |
base : #ff0000, | |
dark : #ffcccc | |
), |
// ---- | |
// Sass (v3.3.14) | |
// Compass (v1.0.1) | |
// ---- | |
// http://erskinedesign.com/blog/friendlier-colour-names-sass-maps/ | |
//http://maketea.co.uk/2014/07/21/managing-relationships-between-colours-with-sass.html | |
// setting | |
$color-palette :( | |
red : ( |
"use strict"; | |
function foo() {} | |
module.exports = { foo: foo }; |