Skip to content
This repository was archived by the owner on Apr 2, 2019. It is now read-only.

Commit 3c3db00

Browse files
committed
updated plugin dependencies and docs
1 parent 2a42373 commit 3c3db00

File tree

222 files changed

+17835
-206
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

222 files changed

+17835
-206
lines changed

.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
.DS_Store
2-
vendor
2+
composer.lock

CHANGELOG.md

+6-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11
# v1.0.1
2+
## 02/23/2016
23

3-
## 02/13/2016
44
1. [](#new)
5-
* Ensure compatibility with the Grav Admin Plugin
5+
* Added Admin-side plugin config form
6+
2. [](#improved)
7+
* Updated Carbon Date library to latest version
8+
* Updated code documentation
69

10+
# v1.0.0
711
## 01/09/2015
812

913
1. [](#new)

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Date tools plugin for Grav CMS
22

3-
This Grav CMS plugin provides date tools to use inside of Twig for filtering pages. With the release of Grav 0.9.13 `startDate` and `endDate` were introduced to collection parsing. You can use the following date tools to set various dates you would like your collection to fall between.
3+
This [Grav](http://getgrav.org) plugin provides date tools to use inside of Twig for filtering pages. With the release of Grav 0.9.13 `startDate` and `endDate` were introduced to collection parsing. You can use the following `datetools` to set various dates for retrieving [collections.](http://learn.getgrav.org/content/collections)
44

55
## Configuration
66

blueprints.yaml

+26-2
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,33 @@ icon: clock-o
55
author:
66
name: Kaleb Heitzman
77
8-
url: http://kheitzman.com
8+
url: http://brandr.co
99
homepage: http://github.com/kalebheitzman/grav-plugin-datetools
1010
docs: https://github.com/kalebheitzman/grav-plugin-datetools#date-tools-plugin-for-grav-cms
1111
keywords: events, plugin
1212
bugs: https://github.com/kalebheitzman/grav-plugin-datetools/issues
13-
license: MIT
13+
license: MIT
14+
15+
form:
16+
validation: loose
17+
fields:
18+
dateFormat:
19+
type: Section
20+
title: Date Formats
21+
fields:
22+
dateFormat.default:
23+
type: text
24+
label: Default
25+
default: "m/d/y g:ia" # 01/01/2015, 12:00am
26+
dateFormat.long:
27+
type: text
28+
label: Long
29+
default: "l, F j, g:ia" # Thursday, January 1, 12:00am
30+
dateFormat.medium:
31+
type: text
32+
label: Medium
33+
default: "F j, g:ia" # January 1, 12:00am
34+
dateFormat.short:
35+
type: text
36+
label: Short
37+
default: "m/d/y" # 01/01/2015

classes/datetools.php

+11-10
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ public function __construct()
7474
}
7575

7676
/**
77-
* initialize processing vars
77+
* Initialize processing vars
7878
*
7979
* @internal
8080
*/
@@ -99,20 +99,21 @@ private function initProcessingVars()
9999
*/
100100
private function initCommonDates()
101101
{
102-
$this->today = $this->now()->format($this->dateFormat);
103-
$this->tomorrow = $this->tomorrow()->format($this->dateFormat);
104-
$this->yesterday = $this->yesterday()->format($this->dateFormat);
105-
$this->startOfWeek = $this->startOfWeek()->format($this->dateFormat);
106-
$this->endOfWeek = $this->endOfWeek()->format($this->dateFormat);
102+
$this->today = $this->now()->format($this->dateFormat);
103+
$this->tomorrow = $this->tomorrow()->format($this->dateFormat);
104+
$this->yesterday = $this->yesterday()->format($this->dateFormat);
105+
$this->startOfWeek = $this->startOfWeek()->format($this->dateFormat);
106+
$this->endOfWeek = $this->endOfWeek()->format($this->dateFormat);
107107
$this->startOfMonth = $this->startOfMonth()->format($this->dateFormat);
108-
$this->endOfMonth = $this->endOfMonth()->format($this->dateFormat);
109-
$this->startOfYear = $this->startOfYear()->format($this->dateFormat);
110-
$this->endOfYear = $this->endOfYear()->format($this->dateFormat);
108+
$this->endOfMonth = $this->endOfMonth()->format($this->dateFormat);
109+
$this->startOfYear = $this->startOfYear()->format($this->dateFormat);
110+
$this->endOfYear = $this->endOfYear()->format($this->dateFormat);
111111
}
112112

113113
/**
114114
* Parse a relative date
115-
*
115+
*
116+
* @param string $string Relative Date string
116117
* @return string DateTime
117118
*/
118119
public function parseDate($string = null)

composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
22
"require": {
3-
"nesbot/Carbon": "*"
3+
"nesbot/Carbon": "~1.14"
44
}
55
}

composer.lock

-189
This file was deleted.

vendor/autoload.php

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<?php
2+
3+
// autoload.php @generated by Composer
4+
5+
require_once __DIR__ . '/composer' . '/autoload_real.php';
6+
7+
return ComposerAutoloaderInite295126151982f6a5c5df7ff7e3749b4::getLoader();

0 commit comments

Comments
 (0)