우리나라 말에서 
 시간(時間)과 시각(時刻)은 다른 개념이다.

 그럼 영어에서는 어떻게 구분을 해야할까?
 사실 내가 관심 있는 부분은 영어라는 것은 큰 의미는 없고, 
 코드에서 변수명/함수명을 작명시 어떻게 구분하는 게 좋을까에 대한 것이다.

 예전부터 고민했던 부분인데
 한 가지 괜찮은 대안을 Boost.Date_Time Library 문서에서 찾을 수 있었다.

-----

Domain Concepts

The date time domain is rich in terminology and problems. The following is a brief introduction to the concepts you will find reflected in the library.

The library supports 3 basic temporal types:

  • Time Point -- Specifier for a location in the time continuum.
  • Time Duration -- A length of time unattached to any point on the time continuum.
  • Time Interval -- A duration of time attached to a specific point in the time continuum. Also known as a time period.
-----

 요약 하면
 시각: Time Point 
 시간: Time Duration
 시간 구간: Time Interval or Time Period

 여기서 시간 구간이라는 의미는 특정 시각 두 개의 값으로 이루어진 시간을 의미한다.
 즉, 10분이라는 것은 시간(Time Duration) 이고,
 23시 00분 ~ 23시 10분은 시간 구간(Time Interval) 이다.

 약간 응용하면 <Time Interval>는 <Time Point>와 <Time Duration>의 조합으로 만들 수 있다.


 오버해서 더 나아가면.. (수학에서) 구간 이라는 것은 
 개구간(Unbounded Interval)과 폐구간(Bounded Interval)이 있다.

 [1, 10]은 Endpoints인 1과 10을 포함한다는 것 이고 (폐구간)
 (1, 10)은 Endpoints인 1과 10을 포함하지 않는 다는 것이다. (개구간)

 참고로, Boost.Date_Time 라이브러리에서 구간(Interval)은..  [Begin, End) 로 사용한다.





 
Posted by U_Seung