Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added a Date Class for date related methods #95

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/api.html
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ <h4>ADVANCED</h4>
<ul>
<li><a href="api.html" class="active"><span>Embedding API</span></a></li>
<li><a href="system.html"><span>System class</span></a></li>
<li><a href="date.html"><span>Date class</span></a></li>
<li><a href="unit-test.html"><span>Unit test</span></a></li>
<li><a href="contributing.html"><span>Contributing</span></a></li>
</ul>
Expand Down
1 change: 1 addition & 0 deletions docs/classes.html
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ <h4>ADVANCED</h4>
<ul>
<li><a href="api.html"><span>Embedding API</span></a></li>
<li><a href="system.html"><span>System class</span></a></li>
<li><a href="date.html"><span>Date class</span></a></li>
<li><a href="unit-test.html"><span>Unit test</span></a></li>
<li><a href="contributing.html"><span>Contributing</span></a></li>
</ul>
Expand Down
1 change: 1 addition & 0 deletions docs/closures.html
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ <h4>ADVANCED</h4>
<ul>
<li><a href="api.html"><span>Embedding API</span></a></li>
<li><a href="system.html"><span>System class</span></a></li>
<li><a href="date.html"><span>Date class</span></a></li>
<li><a href="unit-test.html"><span>Unit test</span></a></li>
<li><a href="contributing.html"><span>Contributing</span></a></li>
</ul>
Expand Down
1 change: 1 addition & 0 deletions docs/contributing.html
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ <h4>ADVANCED</h4>
<ul>
<li><a href="api.html"><span>Embedding API</span></a></li>
<li><a href="system.html"><span>System class</span></a></li>
<li><a href="date.html"><span>Date class</span></a></li>
<li><a href="unit-test.html"><span>Unit test</span></a></li>
<li><a href="contributing.html" class="active"><span>Contributing</span></a></li>
</ul>
Expand Down
1 change: 1 addition & 0 deletions docs/control-flow.html
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ <h4>ADVANCED</h4>
<ul>
<li><a href="api.html"><span>Embedding API</span></a></li>
<li><a href="system.html"><span>System class</span></a></li>
<li><a href="date.html"><span>Date class</span></a></li>
<li><a href="unit-test.html"><span>Unit test</span></a></li>
<li><a href="contributing.html"><span>Contributing</span></a></li>
</ul>
Expand Down
143 changes: 143 additions & 0 deletions docs/date.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,143 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Gravity: Date</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/5.0.0/normalize.min.css" />
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Open+Sans:400,700,800">
<link rel="stylesheet" href="scripts/highlight/styles/github-gist.css">
<link rel="stylesheet" href="stylesheets/styles.css">
</head>
<body>

<!-- BEGIN NAVIGATION BAR -->
<nav class="navbar navbar-default navbar-fixed-top">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="http://gravity-lang.org"><img src="images/logo.png" width="32px" height="36px"></a>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav navbar-right">
<li class="active"><a href="index.html">Gravity</a></li>
<li><a href="internals/index.html">Internals</a></li>
<li><a href="https://github.com/marcobambini/gravity">GitHub</a></li>
</ul>
</div><!--/.nav-collapse -->
</div>
</nav>
<!-- END NAVIGATION BAR -->

<div class="container body-container">
<div class="main-content">
<div class="row">

<!-- BEGIN SIDEBAR -->
<div class="col-sm-3 border-right section-left">
<div saveheight="1" class="sidebar-nav">
<h4>INTRODUCTION</h4>
<ul>
<li><a href="index.html"><span>Introduction</span></a></li>
<li><a href="getting-started.html"><span>Getting Started</span></a></li>
</ul>
<h4>LANGUAGE GUIDE</h4>
<ul>
<li><a href="syntax.html"><span>Syntax</span></a></li>
<li><a href="operators.html"><span>Operators</span></a></li>
<li><a href="types.html"><span>Types</span></a></li>
<li><a href="lists.html"><span>Lists</span></a></li>
<li><a href="maps.html"><span>Maps</span></a></li>
<li><a href="enum.html"><span>Enum</span></a></li>
<li><a href="functions.html"><span>Functions</span></a></li>
<li><a href="closures.html"><span>Closures</span></a></li>
<li><a href="classes.html"><span>Classes</span></a></li>
<li><a href="control-flow.html"><span>Control Flow</span></a></li>
<li><a href="loops.html"><span>Loops</span></a></li>
<li><a href="fibers.html"><span>Fibers</span></a></li>
</ul>
<h4>ADVANCED</h4>
<ul>
<li><a href="api.html"><span>Embedding API</span></a></li>
<li><a href="system.html"><span>System class</span></a></li>
<li><a href="date.html" class="active"><span>Date class</span></a></li>
<li><a href="unit-test.html"><span>Unit test</span></a></li>
<li><a href="contributing.html"><span>Contributing</span></a></li>
</ul>
</div>
</div>
<!-- END SIDEBAR -->

<!-- BEGIN CONTENT -->
<div class="col-sm-9 border-left section-right">
<h1 class="section-header">Date</h1><hr>

<p class="section-content">
System class is a class registered in every Gravity VM that offers some useful methods and properties.</p>
<h4 class="section-h4">Methods</h4>
<pre><code class="swift">
func main() {
// Returns epoch time
var t = Date.time()

// Returns the current seconds (0-59)
t = Date.second()

// Returns the current minute (0-59)
t = Date.minute()

// Returns the current hour (0-23)
t = Date.hour()

// Returns the day of the month (1-31)
t = Date.month_day()

// Returns the current month (1-12)
t = Date.month()

// Returns the current year
t = Date.year()

// Returns the current day of the week (1-7)
t = Date.week_day()

// Returns the current day of the year (1-366)
t = Date.year_day()

// Returns a boolean based on if daylight savings is in effect
t = Date.daylight_savings()
}
</code></pre>

</div>
<!-- END CONTENT -->

</div> <!-- /row -->
</div> <!-- /main-content -->
</div> <!-- /container -->

<!-- BEGIN FOOTER -->
<footer class="navbar-fixed-bottom">
<div class="container footer">
<p>
</p>
</div>
</footer>
<!-- END FOOTER -->

<!-- Bootstrap JS -->
<script src="https://code.jquery.com/jquery-1.12.4.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>

<!-- Highlights JS -->
<script src="scripts/highlight/highlight.min.js"></script>
<script>hljs.initHighlightingOnLoad();</script>

</body>
</html>
1 change: 1 addition & 0 deletions docs/enum.html
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ <h4>ADVANCED</h4>
<ul>
<li><a href="api.html"><span>Embedding API</span></a></li>
<li><a href="system.html"><span>System class</span></a></li>
<li><a href="date.html"><span>Date class</span></a></li>
<li><a href="unit-test.html"><span>Unit test</span></a></li>
<li><a href="contributing.html"><span>Contributing</span></a></li>
</ul>
Expand Down
1 change: 1 addition & 0 deletions docs/fibers.html
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ <h4>ADVANCED</h4>
<ul>
<li><a href="api.html"><span>Embedding API</span></a></li>
<li><a href="system.html"><span>System class</span></a></li>
<li><a href="date.html"><span>Date class</span></a></li>
<li><a href="unit-test.html"><span>Unit test</span></a></li>
<li><a href="contributing.html"><span>Contributing</span></a></li>
</ul>
Expand Down
1 change: 1 addition & 0 deletions docs/functions.html
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ <h4>ADVANCED</h4>
<ul>
<li><a href="api.html"><span>Embedding API</span></a></li>
<li><a href="system.html"><span>System class</span></a></li>
<li><a href="date.html"><span>Date class</span></a></li>
<li><a href="unit-test.html"><span>Unit test</span></a></li>
<li><a href="contributing.html"><span>Contributing</span></a></li>
</ul>
Expand Down
1 change: 1 addition & 0 deletions docs/getting-started.html
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ <h4>ADVANCED</h4>
<ul>
<li><a href="api.html"><span>Embedding API</span></a></li>
<li><a href="system.html"><span>System class</span></a></li>
<li><a href="date.html"><span>Date class</span></a></li>
<li><a href="unit-test.html"><span>Unit test</span></a></li>
<li><a href="contributing.html"><span>Contributing</span></a></li>
</ul>
Expand Down
1 change: 1 addition & 0 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ <h4>ADVANCED</h4>
<ul>
<li><a href="api.html"><span>Embedding API</span></a></li>
<li><a href="system.html"><span>System class</span></a></li>
<li><a href="date.html"><span>Date class</span></a></li>
<li><a href="unit-test.html"><span>Unit test</span></a></li>
<li><a href="contributing.html"><span>Contributing</span></a></li>
</ul>
Expand Down
1 change: 1 addition & 0 deletions docs/lists.html
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ <h4>ADVANCED</h4>
<ul>
<li><a href="api.html"><span>Embedding API</span></a></li>
<li><a href="system.html"><span>System class</span></a></li>
<li><a href="date.html"><span>Date class</span></a></li>
<li><a href="unit-test.html"><span>Unit test</span></a></li>
<li><a href="contributing.html"><span>Contributing</span></a></li>
</ul>
Expand Down
1 change: 1 addition & 0 deletions docs/loops.html
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ <h4>ADVANCED</h4>
<ul>
<li><a href="api.html"><span>Embedding API</span></a></li>
<li><a href="system.html"><span>System class</span></a></li>
<li><a href="date.html"><span>Date class</span></a></li>
<li><a href="unit-test.html"><span>Unit test</span></a></li>
<li><a href="contributing.html"><span>Contributing</span></a></li>
</ul>
Expand Down
1 change: 1 addition & 0 deletions docs/maps.html
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ <h4>ADVANCED</h4>
<ul>
<li><a href="api.html"><span>Embedding API</span></a></li>
<li><a href="system.html"><span>System class</span></a></li>
<li><a href="date.html"><span>Date class</span></a></li>
<li><a href="unit-test.html"><span>Unit test</span></a></li>
<li><a href="contributing.html"><span>Contributing</span></a></li>
</ul>
Expand Down
1 change: 1 addition & 0 deletions docs/operators.html
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ <h4>ADVANCED</h4>
<ul>
<li><a href="api.html"><span>Embedding API</span></a></li>
<li><a href="system.html"><span>System class</span></a></li>
<li><a href="date.html"><span>Date class</span></a></li>
<li><a href="unit-test.html"><span>Unit test</span></a></li>
<li><a href="contributing.html"><span>Contributing</span></a></li>
</ul>
Expand Down
1 change: 1 addition & 0 deletions docs/syntax.html
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ <h4>ADVANCED</h4>
<ul>
<li><a href="api.html"><span>Embedding API</span></a></li>
<li><a href="system.html"><span>System class</span></a></li>
<li><a href="date.html"><span>Date class</span></a></li>
<li><a href="unit-test.html"><span>Unit test</span></a></li>
<li><a href="contributing.html"><span>Contributing</span></a></li>
</ul>
Expand Down
1 change: 1 addition & 0 deletions docs/system.html
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ <h4>ADVANCED</h4>
<ul>
<li><a href="api.html"><span>Embedding API</span></a></li>
<li><a href="system.html" class="active"><span>System class</span></a></li>
<li><a href="date.html"><span>Date class</span></a></li>
<li><a href="unit-test.html"><span>Unit test</span></a></li>
<li><a href="contributing.html"><span>Contributing</span></a></li>
</ul>
Expand Down
1 change: 1 addition & 0 deletions docs/types.html
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ <h4>ADVANCED</h4>
<ul>
<li><a href="api.html"><span>Embedding API</span></a></li>
<li><a href="system.html"><span>System class</span></a></li>
<li><a href="date.html"><span>Date class</span></a></li>
<li><a href="unit-test.html"><span>Unit test</span></a></li>
<li><a href="contributing.html"><span>Contributing</span></a></li>
</ul>
Expand Down
1 change: 1 addition & 0 deletions docs/unit-test.html
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ <h4>ADVANCED</h4>
<ul>
<li><a href="api.html"><span>Embedding API</span></a></li>
<li><a href="system.html"><span>System class</span></a></li>
<li><a href="date.html"><span>Date class</span></a></li>
<li><a href="unit-test.html" class="active"><span>Unit test</span></a></li>
<li><a href="contributing.html"><span>Contributing</span></a></li>
</ul>
Expand Down
Loading