Disable the now tag on Linux
NSDate is unavailable
This commit is contained in:
@@ -13,7 +13,9 @@ public class Namespace {
|
||||
registerTag("for", parser: ForNode.parse)
|
||||
registerTag("if", parser: IfNode.parse)
|
||||
registerTag("ifnot", parser: IfNode.parse_ifnot)
|
||||
#if !os(Linux)
|
||||
registerTag("now", parser: NowNode.parse)
|
||||
#endif
|
||||
registerTag("include", parser: IncludeNode.parse)
|
||||
registerTag("extends", parser: ExtendsNode.parse)
|
||||
registerTag("block", parser: BlockNode.parse)
|
||||
|
||||
@@ -76,6 +76,8 @@ public class VariableNode : NodeType {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#if !os(Linux)
|
||||
public class NowNode : NodeType {
|
||||
public let format:Variable
|
||||
|
||||
@@ -114,6 +116,8 @@ public class NowNode : NodeType {
|
||||
return formatter!.stringFromDate(date)
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
public class ForNode : NodeType {
|
||||
let variable:Variable
|
||||
|
||||
Reference in New Issue
Block a user