# \[Pro\] Display Date and Time

**URL:** <https://discourse.softpress.com/t/pro-display-date-and-time/11559>\
**Category:** Dynamo\
**Created:** [August 4, 2011, 2:52pm UTC](https://discourse.softpress.com/t/pro-display-date-and-time/11559 "2011-08-04T14:52:08Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kevin\_McElligott](https://discourse.softpress.com/letter_avatar_proxy/v4/letter/k/a9adbd/32.png) [@Kevin\_McElligott](https://discourse.softpress.com/u/Kevin_McElligott)\
**Post date:** [August 4, 2011, 2:52pm UTC](https://discourse.softpress.com/t/pro-display-date-and-time/11559/1 "2011-08-04T14:52:08Z")

</div>

Does anyone know of a simple but good way to display the current time and date on a Freeway page?

Kevin

* * *

dynamo mailing list  
email@hidden  
Update your subscriptions at:  
[http://freewaytalk.net/person/options](http://freewaytalk.net/person/options)

---

<div class="post-metadata">

**Author:** ![Julio\_C\_Collazo](https://discourse.softpress.com/letter_avatar_proxy/v4/letter/j/77aa72/32.png) [@Julio\_C\_Collazo](https://discourse.softpress.com/u/Julio_C_Collazo)\
**Post date:** [August 4, 2011, 4:38pm UTC](https://discourse.softpress.com/t/pro-display-date-and-time/11559/2 "2011-08-04T16:38:15Z")

</div>

As the iPhone, there is an app for that, go to [actionsforge.com](http://actionsforge.com), you  
will find it there, is simple to use…

On Aug 4, 2011, at 10:52 AM, Kevin McElligott wrote:

> Does anyone know of a simple but good way to display the current  
> time and date on a Freeway page?
> 
> Kevin
> 
> * * *
> 
> dynamo mailing list  
> email@hidden  
> Update your subscriptions at:  
> [http://freewaytalk.net/person/options](http://freewaytalk.net/person/options)

* * *

dynamo mailing list  
email@hidden  
Update your subscriptions at:  
[http://freewaytalk.net/person/options](http://freewaytalk.net/person/options)

---

<div class="post-metadata">

**Author:** ![Kevin\_McElligott](https://discourse.softpress.com/letter_avatar_proxy/v4/letter/k/a9adbd/32.png) [@Kevin\_McElligott](https://discourse.softpress.com/u/Kevin_McElligott)\
**Post date:** [August 4, 2011, 4:53pm UTC](https://discourse.softpress.com/t/pro-display-date-and-time/11559/3 "2011-08-04T16:53:35Z")

</div>

Do you know what it’s called?

* * *

dynamo mailing list  
email@hidden  
Update your subscriptions at:  
[http://freewaytalk.net/person/options](http://freewaytalk.net/person/options)

---

<div class="post-metadata">

**Author:** ![waltd](https://discourse.softpress.com/user_avatar/discourse.softpress.com/waltd/32/2720_2.png) [@waltd](https://discourse.softpress.com/u/waltd)\
**Post date:** [August 4, 2011, 5:07pm UTC](https://discourse.softpress.com/t/pro-display-date-and-time/11559/4 "2011-08-04T17:07:32Z")

</div>

That’s really strange, I am sure there used to be such an Action, I  
know I used it back in the Freeway 2 days.

There’s not very much to this. Draw an HTML box on your page, double-  
click inside it, and type two spaces. Click the back-arrow so your  
cursor is between them, and use the main menu: Insert / Markup Item.  
In the MI, paste the following:

```auto
<script type="text/javascript">
var d = new Date();
var out = d.toLocaleString();
document.write(out);
</script>

```

Okay out of the dialog, and then use Select All to select the two  
spaces and the Markup Item in between them (this will look like a  
little rectangle with an H inside it). Apply any text or paragraph  
style you like to the selection, and your page will be set. Preview  
in a browser to see the date.

This is a very basic example, if you want more specific formatting of  
the date, there are tons and tons of formatting options available  
here: [JavaScript Date Reference](http://www.w3schools.com/jsref/jsref_obj_date.asp)

Note that this technique will only work on a non-strict page,  
document.write is forbidden in the Strict doctypes. If you want to do  
this in a strict page, you will need to use Protaculous instead. Let  
me know, it’s very similar.

Walter

On Aug 4, 2011, at 12:53 PM, Kevin McElligott wrote:

> Do you know what it’s called?
> 
> * * *
> 
> dynamo mailing list  
> email@hidden  
> Update your subscriptions at:  
> [http://freewaytalk.net/person/options](http://freewaytalk.net/person/options)

* * *

dynamo mailing list  
email@hidden  
Update your subscriptions at:  
[http://freewaytalk.net/person/options](http://freewaytalk.net/person/options)

---

<div class="post-metadata">

**Author:** ![Frank\_H2](https://discourse.softpress.com/letter_avatar_proxy/v4/letter/f/eb8c5e/32.png) [@Frank\_H2](https://discourse.softpress.com/u/Frank_H2)\
**Post date:** [August 4, 2011, 5:17pm UTC](https://discourse.softpress.com/t/pro-display-date-and-time/11559/5 "2011-08-04T17:17:54Z")

</div>

I use one called current date, but it does not show the time of day. There were a ton of time apps - java script? at the time, but I figured it didn’t matter as unlike the day, most places would be a different time anyway…

It is in the ‘standards’ action file - ships with freeway, I believe.

Frank

On Aug 4, 2011, at 10:07 AM, Walter Lee Davis wrote:

That’s really strange, I am sure there used to be such an Action, I know I used it back in the Freeway 2 days.

There’s not very much to this. Draw an HTML box on your page, double-click inside it, and type two spaces. Click the back-arrow so your cursor is between them, and use the main menu: Insert / Markup Item. In the MI, paste the following:

```auto
<script type="text/javascript">
var d = new Date();
var out = d.toLocaleString();
document.write(out);
</script>

```

Okay out of the dialog, and then use Select All to select the two spaces and the Markup Item in between them (this will look like a little rectangle with an H inside it). Apply any text or paragraph style you like to the selection, and your page will be set. Preview in a browser to see the date.

This is a very basic example, if you want more specific formatting of the date, there are tons and tons of formatting options available here: [JavaScript Date Reference](http://www.w3schools.com/jsref/jsref_obj_date.asp)

Note that this technique will only work on a non-strict page, document.write is forbidden in the Strict doctypes. If you want to do this in a strict page, you will need to use Protaculous instead. Let me know, it’s very similar.

Walter

On Aug 4, 2011, at 12:53 PM, Kevin McElligott wrote:

> Do you know what it’s called?
> 
> * * *
> 
> dynamo mailing list  
> email@hidden  
> Update your subscriptions at:  
> [http://freewaytalk.net/person/options](http://freewaytalk.net/person/options)

* * *

dynamo mailing list  
email@hidden  
Update your subscriptions at:  
[http://freewaytalk.net/person/options](http://freewaytalk.net/person/options)

* * *

dynamo mailing list  
email@hidden  
Update your subscriptions at:  
[http://freewaytalk.net/person/options](http://freewaytalk.net/person/options)

---

<div class="post-metadata">

**Author:** ![Kevin\_McElligott](https://discourse.softpress.com/letter_avatar_proxy/v4/letter/k/a9adbd/32.png) [@Kevin\_McElligott](https://discourse.softpress.com/u/Kevin_McElligott)\
**Post date:** [August 4, 2011, 6:06pm UTC](https://discourse.softpress.com/t/pro-display-date-and-time/11559/6 "2011-08-04T18:06:37Z")

</div>

That’s great Walt and is working well.

I may seem a little dim but what is a strict or non-strct page, how would I tell.

Kev

Creative Line Design

* * *

dynamo mailing list  
email@hidden  
Update your subscriptions at:  
[http://freewaytalk.net/person/options](http://freewaytalk.net/person/options)

---

<div class="post-metadata">

**Author:** ![waltd](https://discourse.softpress.com/user_avatar/discourse.softpress.com/waltd/32/2720_2.png) [@waltd](https://discourse.softpress.com/u/waltd)\
**Post date:** [August 4, 2011, 6:22pm UTC](https://discourse.softpress.com/t/pro-display-date-and-time/11559/7 "2011-08-04T18:22:31Z")

</div>

In the Page Inspector, you can choose from a set of options in the  
Output picker. Some of these include the word Strict in their names.  
Those correspond to the DOCTYPE tag that Freeway writes out to the  
HTML it generates, and triggers a different set of expectations in a  
browser.

There are a whole host of things you can’t do in a Strict DOCTYPE that  
you can do in a “loose” one. iframes, link targets, document.write, etc.

There’s no better/worse here, just different. Don’t choose Strict out  
of some cargo-cult idea that it’s better than the alternative.  
Browsers don’t care at all which one you use, as long as you use one  
and stick to it.

Walter

On Aug 4, 2011, at 2:06 PM, Kevin McElligott wrote:

> That’s great Walt and is working well.
> 
> I may seem a little dim but what is a strict or non-strct page, how  
> would I tell.
> 
> Kev
> 
> Creative Line Design
> 
> * * *
> 
> dynamo mailing list  
> email@hidden  
> Update your subscriptions at:  
> [http://freewaytalk.net/person/options](http://freewaytalk.net/person/options)

* * *

dynamo mailing list  
email@hidden  
Update your subscriptions at:  
[http://freewaytalk.net/person/options](http://freewaytalk.net/person/options)

---

<div class="post-metadata">

**Author:** ![Kevin\_McElligott](https://discourse.softpress.com/letter_avatar_proxy/v4/letter/k/a9adbd/32.png) [@Kevin\_McElligott](https://discourse.softpress.com/u/Kevin_McElligott)\
**Post date:** [August 4, 2011, 10:03pm UTC](https://discourse.softpress.com/t/pro-display-date-and-time/11559/8 "2011-08-04T22:03:12Z")

</div>

Hi Walt  
I’m on Freeway 5.6 on a Mac. There is no Output picker in the Page Inspector as far as I can see - Am I still being dim?

Kev

* * *

dynamo mailing list  
email@hidden  
Update your subscriptions at:  
[http://freewaytalk.net/person/options](http://freewaytalk.net/person/options)

---

<div class="post-metadata">

**Author:** ![waltd](https://discourse.softpress.com/user_avatar/discourse.softpress.com/waltd/32/2720_2.png) [@waltd](https://discourse.softpress.com/u/waltd)\
**Post date:** [August 4, 2011, 10:06pm UTC](https://discourse.softpress.com/t/pro-display-date-and-time/11559/9 "2011-08-04T22:06:58Z")

</div>

No, I am. The Output tab (third from the left) is home to the HTML  
picker, which has the list of different DOCTYPEs. My mistake. You can  
also set this property in the New Document dialog, where it will apply  
to every page you create in that document. (You can change individual  
pages to a different HTML format, they don’t all have to be the same.)

Walter

On Aug 4, 2011, at 6:03 PM, Kevin McElligott wrote:

> Hi Walt  
> I’m on Freeway 5.6 on a Mac. There is no Output picker in the Page  
> Inspector as far as I can see - Am I still being dim?
> 
> Kev
> 
> * * *
> 
> dynamo mailing list  
> email@hidden  
> Update your subscriptions at:  
> [http://freewaytalk.net/person/options](http://freewaytalk.net/person/options)

* * *

dynamo mailing list  
email@hidden  
Update your subscriptions at:  
[http://freewaytalk.net/person/options](http://freewaytalk.net/person/options)
