Year Variable
-
lacastle
- Propellus Maximus
- Posts: 1028
- Joined: Thu Apr 12, 2007 7:28 am
- Location: Wilmington, DE
- Contact:
Year Variable
Is it possible to create a new variable that is just the current year? Can't seem to find where MadCap sets the System Variable code.
Thanks.
Thanks.
Laura A. Castle
http://www.lauracastle.com
http://www.lauracastle.com
Re: Year Variable
Sure -- just create a new variable, call it currentYear (or whatever), and enter the year. You will, of course, have to change it manually every year.
Flare v6.1 | Capture 4.0.0
-
lacastle
- Propellus Maximus
- Posts: 1028
- Joined: Thu Apr 12, 2007 7:28 am
- Location: Wilmington, DE
- Contact:
Re: Year Variable
Yeah, I knew I could do it that way.
I might as well just type the year and not use a variable if I'm going to have to manually update it. I just want it on the copyright page.
Thanks.
Thanks.
Laura A. Castle
http://www.lauracastle.com
http://www.lauracastle.com
Re: Year Variable
I figured that might be the case. I poked around the Flare program files trying to find out if there was any nifty little XML or other code we could hack up, but I came up empty. Looks like system variables are hard-coded into the Flare app.
Flare v6.1 | Capture 4.0.0
-
lacastle
- Propellus Maximus
- Posts: 1028
- Joined: Thu Apr 12, 2007 7:28 am
- Location: Wilmington, DE
- Contact:
Re: Year Variable
Thanks for trying. I couldn't find anything either. I guess I'll submit an enhancement request for customizing/creating new system variables.
Laura A. Castle
http://www.lauracastle.com
http://www.lauracastle.com
-
RamonS
- Senior Propellus Maximus
- Posts: 4293
- Joined: Thu Feb 02, 2006 9:29 am
- Location: The Electric City
Re: Year Variable
The question is also which year you want. The year the output was compiled in or the year the topic is viewed. Also, unless the content gets drastically changed I wonder if there is a need to adjust the copyright year.
New Book: Creating user-friendly Online Help
Paperback http://www.amazon.com/dp/1449952038/ or https://www.createspace.com/3416509
eBook http://www.amazon.com/dp/B005XB9E3U

Paperback http://www.amazon.com/dp/1449952038/ or https://www.createspace.com/3416509
eBook http://www.amazon.com/dp/B005XB9E3U
-
lacastle
- Propellus Maximus
- Posts: 1028
- Joined: Thu Apr 12, 2007 7:28 am
- Location: Wilmington, DE
- Contact:
Re: Year Variable
Yeah, I guess it's not that big of a deal. I just wanted to have the ability to make custom, auto-changing variables, so that's what I asked for in the enhancement.
Laura A. Castle
http://www.lauracastle.com
http://www.lauracastle.com
Re: Year Variable
Are you having the copyright info appear on every page? If so, then maybe adding it to a masterpage would be easier. Wouldn't even have to be a variable -- just enter the date on the masterpage and it'll appear on every topic.
Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
-
lacastle
- Propellus Maximus
- Posts: 1028
- Joined: Thu Apr 12, 2007 7:28 am
- Location: Wilmington, DE
- Contact:
Re: Year Variable
No, I was trying to create a print target for my help that had a copyright page. It would have taken me 1 second to type 2008, but instead it's been a lot longer thinking about the possibilities! I never seem to like the easy way if i think there may be an easier! 
Laura A. Castle
http://www.lauracastle.com
http://www.lauracastle.com
Re: Year Variable
Digging this back up from the past...
Is it yet possible to accomplish?
Is it yet possible to accomplish?
-
RamonS
- Senior Propellus Maximus
- Posts: 4293
- Joined: Thu Feb 02, 2006 9:29 am
- Location: The Electric City
Re: Year Variable
Is what possible to accomplish? This thread tossed several ideas around and I don't know which one you mean.
New Book: Creating user-friendly Online Help
Paperback http://www.amazon.com/dp/1449952038/ or https://www.createspace.com/3416509
eBook http://www.amazon.com/dp/B005XB9E3U

Paperback http://www.amazon.com/dp/1449952038/ or https://www.createspace.com/3416509
eBook http://www.amazon.com/dp/B005XB9E3U
Re: Year Variable
Sorry...
I should know better to be clearer in my questions...
We don't want to have to revisit the docs we provide to our clients every year to update the copyright info on the Master and would like to place a bit of code that would update annually.
All of our products are vBulletin plugins and we are able to insert a bit of code in the branding of the actual product that reads "Copyright 2008 - currentyear OurCompanyName" that automagiclly updates. We'd like to extend this into the doc set as well.
I should know better to be clearer in my questions...
We don't want to have to revisit the docs we provide to our clients every year to update the copyright info on the Master and would like to place a bit of code that would update annually.
All of our products are vBulletin plugins and we are able to insert a bit of code in the branding of the actual product that reads "Copyright 2008 - currentyear OurCompanyName" that automagiclly updates. We'd like to extend this into the doc set as well.
Re: Year Variable
I don't believe anything in Flare has changed regarding this.
However, as an idea for how to handle this, could you create the copyright stuff as a snippet, and then, using Global Project Linking, make the change every year to one snippet and have it update the text across all of your projects?
However, as an idea for how to handle this, could you create the copyright stuff as a snippet, and then, using Global Project Linking, make the change every year to one snippet and have it update the text across all of your projects?
Flare v6.1 | Capture 4.0.0
-
RamonS
- Senior Propellus Maximus
- Posts: 4293
- Joined: Thu Feb 02, 2006 9:29 am
- Location: The Electric City
Re: Year Variable
The copyright year only changes when there are substantial changes to content. Unless that is the case each year you don't need to change the year each time when a handful of topics were added. There are fairly specific rules as to when the year is to be changed. I think I have them somewhere in my endless dungeon of digital documents. I may find it and if I do I share it here.
Besides that, I'd go with the masterpage way or the solution that Andrew proposed.
Besides that, I'd go with the masterpage way or the solution that Andrew proposed.
New Book: Creating user-friendly Online Help
Paperback http://www.amazon.com/dp/1449952038/ or https://www.createspace.com/3416509
eBook http://www.amazon.com/dp/B005XB9E3U

Paperback http://www.amazon.com/dp/1449952038/ or https://www.createspace.com/3416509
eBook http://www.amazon.com/dp/B005XB9E3U
Re: Year Variable
The issue is that many of us want a variable for <year> that applies to whatever we define. And there's no easy way to get one.
For example, in FrameMaker our <year> variable updates to the system year of the last save.
It doesnt matter what the copyright rules are -- what matters is what the boss wants and expects.
For example, in FrameMaker our <year> variable updates to the system year of the last save.
It doesnt matter what the copyright rules are -- what matters is what the boss wants and expects.
All life is a blur of Republicans and meat. -- Zippy the Pinhead
-
peterbrown05
- Propeller Head
- Posts: 52
- Joined: Fri Jun 18, 2010 9:08 am
Re: Year Variable
I would like a variable similar to <year> but one that is the 'build' date. Our automated build system will compile the help weekly and it would be nice for it to automatically include the date in the document. Currently we have a custom build step that creates a custom variable file for each weekly build. All automated, but not very efficient/neat.
Re: Year Variable
Have you looked at the "System" variable set? It contains things like ShortDate, which is the current date (while building the target). That seems like exactly what you want.peterbrown05 wrote:I would like a variable similar to <year> but one that is the 'build' date. Our automated build system will compile the help weekly and it would be nice for it to automatically include the date in the document. Currently we have a custom build step that creates a custom variable file for each weekly build. All automated, but not very efficient/neat.
Flare v6.1 | Capture 4.0.0
-
NetDisplaySystems
- Propeller Head
- Posts: 16
- Joined: Fri Nov 18, 2011 8:28 am
- Location: Eindhoven, The Netherlands
- Contact:
Re: Year Variable
Sorry to bump this topic, but if anyone is still interested in the initial problem (getting the current year automatically in your content), I've solved it by inserting a little script (javascript).
This did the trick for me:
This did the trick for me:
Code: Select all
document.write((new Date()).getFullYear());Net Display Systems, manufacturer of software for digital signage, narrowcasting and digital out-of-home media (DOOHM).
Re: Year Variable
Thanks for that!
-
jasonsmith
- Sr. Propeller Head
- Posts: 205
- Joined: Wed Apr 28, 2010 2:51 am
Re: Year Variable
In the System variables set there are variables LongDate and ShortDate that contain the current year so I guess it shouldn't be that difficult to implement.
-
RamonS
- Senior Propellus Maximus
- Posts: 4293
- Joined: Thu Feb 02, 2006 9:29 am
- Location: The Electric City
Re: Year Variable
But that inserts the year of the date the output was generated, which seems is not what is wanted here.
New Book: Creating user-friendly Online Help
Paperback http://www.amazon.com/dp/1449952038/ or https://www.createspace.com/3416509
eBook http://www.amazon.com/dp/B005XB9E3U

Paperback http://www.amazon.com/dp/1449952038/ or https://www.createspace.com/3416509
eBook http://www.amazon.com/dp/B005XB9E3U
Re: Year Variable
peterbrown05 on Mon Jun 21, 2010 2:56 pm said:
"I would like a variable similar to <year> but one that is the 'build' date."
Yes?
"I would like a variable similar to <year> but one that is the 'build' date."
Yes?
-
peterbrown05
- Propeller Head
- Posts: 52
- Joined: Fri Jun 18, 2010 9:08 am
Re: Year Variable
there are several solutions to similar problems here, some of which are solved previously and some more recently solved with javascript.
I used the Date variable on the front cover, ie Document Date: 23rd July 2011
but at the bottom of every webhelp page I also wanted the copyright that says "Our Company 2000-CurrYear"
the javascript trick should work for that (but havent had time to try it yet)
thanks all
p
I used the Date variable on the front cover, ie Document Date: 23rd July 2011
but at the bottom of every webhelp page I also wanted the copyright that says "Our Company 2000-CurrYear"
the javascript trick should work for that (but havent had time to try it yet)
thanks all
p
Re: Year Variable
A newcomer writes: is this still not possible 'out of the box' without resorting to javascript? Like a previous poster, I just want it to pick up the year of the build date. Seems a bit basic...
Re: Year Variable
Just bumping this 7 years later! It really would be useful if "year" was added as a system variable.
P.
P.