Skip to content

Commit

Permalink
Some minor fixes (e.g. code higliht)
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Tombor authored and Daniel Tombor committed Feb 1, 2016
1 parent 02162df commit efac292
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Source/JsonToSwift.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ <h5 onclick="openInfo()">Readme & FAQ</h5>
<div><input type="checkbox" id="cb-recursive" checked="checked"/>Allow recursion (create DTOs for for inner objects)</div>
<!-- yyyy-MM-dd'T'HH:mm:ss.SSSZ - 2015-07-04T23:10:00.000+02:00 -->
<div class="date">
<div>Date format: <input type="text" id="tb-dateformat" value="yyyy-MM-dd'T'HH:mm:ss.SSSZ"/></div>
<div>Date format: <input type="text" id="tb-dateformat" value="yyyy-MM-ddTHH:mm:ss.SSSZ"/></div>
<div><input id="b-convert" type="button" value="Generate NSDate initializer for this format" onclick="generateDateExtension()" style="width:294px;" /></div><br/>
<div style="margin: 0;"><pre><code id="date-extension"></code></pre></div>
</div>
Expand Down
3 changes: 1 addition & 2 deletions Source/converter.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ function getType(key, value, recursive) {
}

case "string":

if(!isNaN(Date.parse(value, getDateFormat()))) {
return {type: "date", array: false, custom: false};
} else {
Expand Down Expand Up @@ -176,7 +175,7 @@ function generateDateExtension() {
function createDateExtensionHtml(dateFormat) {

var output = "\n<span class=\"definition\">extension</span> <span class=\"type\">NSDate</span> {\n";
output += "\t<span class=\"definition\">convenience init</span>?(<span class=\"type\">dateString: String, format: <span class=\"type\">String = <span class=\"string\">\""+dateFormat+"\"</span>) {\n";
output += "\t<span class=\"definition\">convenience init</span>?(dateString: <span class=\"type\">String</span>, format: <span class=\"type\">String</span> = <span class=\"string\">\""+dateFormat+"\"</span>) {\n";
output += "\t\t<span class=\"definition\">let</span> dateStringFormatter = <span class=\"type\">NSDateFormatter</span>()\n";
output += "\t\tdateStringFormatter.<span class=\"type\">dateFormat</span> = <span class=\"string\">\""+dateFormat+"\"</span>\n";
output += "\t\tdateStringFormatter.<span class=\"type\">locale</span> = <span class=\"type\">NSLocale</span>(localeIdentifier: <span class=\"string\">\"en_US_POSIX\"</span>)\n";
Expand Down
4 changes: 2 additions & 2 deletions Source/stylesheet.css
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
-o-filter: blur(8px);
-ms-filter: blur(8px);
filter: blur(8px);
opacity: 0.3;
opacity: 0.25;
}

html {
Expand Down Expand Up @@ -170,7 +170,7 @@ span.feature {
}

#output, #input {
margin-bottom: 24px !important;
margin-bottom: 30px !important;
}

#info {
Expand Down

0 comments on commit efac292

Please sign in to comment.