Take the 2-minute tour ×
English Language & Usage Stack Exchange is a question and answer site for linguists, etymologists, and serious English language enthusiasts. It's 100% free, no registration required.

If I were to have a text box for someone to enter an integer and dropdown list from which my user would select day(s), hour(s), minute(s) or second(s), is there a single word that would describe what is selected in the dropdown list. The best I can think of is "time unit", but was hoping for a single word to describe an arbitrary unit of time.

share|improve this question
4  
Are there ones for 'unit of length' or 'unit of weight'? –  Mitch Apr 29 '11 at 17:51
1  
I think I would name the control ddlTimeType. –  Biff MaGriff Apr 29 '11 at 21:47
    
I saw the title in a stack overflow ad, and came here with the word "quantum", but I see from the body of the question that's not quite right. –  Raven Dreamer Apr 30 '11 at 5:50

7 Answers 7

up vote 9 down vote accepted

"Time unit" is correct here. "Duration" and similar terms refer to a slice of time (like two hours) not merely to the unit itself.

Of course you may be able to simply leave the box unmarked -- if someone sees "days" in a dropdown they'll know what it's there for.

share|improve this answer
    
+1 for the suggestion to leave it unlabelled –  JeffSahol Apr 29 '11 at 18:54
2  
Yes you should leave it unlabeled. Label the combination of number and unit as "duration" or something similar -- do not label them individually. –  Puddingfox Apr 29 '11 at 19:12
    
I'm looking more for a most appropriate variable name. "TimeUnit" would work, but I was wondering if there might be a better term. Unfortunately leaving a variable unnamed does not quite meet the strictest coding requirements. –  snumpy Apr 29 '11 at 19:49
    
@snumpy: I would use timeUnit (TimeUnit, time_unit, etc.) myself as a variable name. –  Charles May 1 '11 at 1:59

Period, interval, or duration?

share|improve this answer

Since you mentioned that you're looking for an appropriate variable name:

It sounds like the real purpose of this variable is to control the scale (order of magnitude) of the time interval. So why not "scale" or "scaleFactor"? This clearly conveys the relation it has to the other variable.

share|improve this answer

Time-span, timespan, or time span, maybe?

Etymology for span:

span (n.1) "distance between two objects," O.E. span "distance between the thumb and little finger of an extended hand," probably related to M.Du. spannen "to join, fasten" (see span (n.2)). The Gmc. word was borrowed into M.L. as spannus, hence It. spanna, O.Fr. espanne, Fr. empan. As a measure of length, roughly nine inches. Meaning "length of time" first attested 1590s; that of "space between abutments of an arch, etc." is from 1725. Meaning "maximum lateral dimension of an aircraft" is first recorded 1909. Attention span is recorded from 1922. timespan (plural timespans) An interval of time.

So, what you're left with is a unit of time, to what measurement is left for guessing.

Or you could use unit of measurement, but again, this leaves quite a bit to the imagination of the reader - and who exactly going to be reading it? The user? Or other developers? Personally, I would choose what is going to be clearest to both, including to you in the future. If something represents a day, call it Day, similarly: Hour, Minute, and so on.

share|improve this answer

How about "duration"? I think that'll work for you…

share|improve this answer
    
But duration could just as easily (or would better) refer to both the integer and the time unit ("5 hours", "10 days", etc.) –  snumpy Apr 29 '11 at 17:36

In this case, it really depends on the context. While there are single words that describe a unit of time, it depends on what you're using it for.

For example, if you were making a program that would act as a timer, "duration" or "interval" would be a good choice.

There are also cases where simply using "unit" may send the message across, because the user will know what kind of units are being used by looking at the options and the context of the field.

Despite there being single words that may represent units of time, "unit of time" might be the best description in certain cases as well. Do not be afraid to use multiple words if it sounds better.


If you're trying to create a set-up where you have two separate fields, with one for "amount" and one for "unit," it might make sense to lay them out without any labels. For example:

Field: [2] [seconds]

Where [2] and [seconds] are filled fields, with [seconds] being a drop-down box for the unit of time.

share|improve this answer

As you mention coming up with a variable name, perhaps you want to take a different approach entirely.

Most drop down boxes us a combination of (Label, Value) pairs. In your original question you attempt to come up with a name for the Labels "day(s)", "hour(s)", "minute(s)" and "second(s)", but if you're seeking a variable name for use in your code perhaps you would really like a term which describes the values.

For example, the values in your drop down box may be 86400, 3600, 60, 1. In which case the name SecondsPerUnit or UnitsToSeconds may be more appropriate. And a variable name describing the numeric portion of the time entered by the user could be "TimeInUnits".

Thus it's clear your dimensions are correct when you write "Seconds = TimeInUnits * UnitsToSeconds".

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.