--- 
title: Compass Environment Helpers
crumb: Environment Helpers
framework: compass
meta_description: Helper functions for inspecting the environment of the current compilation.
layout: core
classnames:
  - reference
  - core
  - helpers
documented_functions:
  - "compass-env"
  - "current-time"
  - "current-date"
  - "current-source-file"
  - "current-output-file"

---
%h1 Compass Environment Helpers

%p Helper functions for inspecting the environmental details of the current compilation

#compass-env.helper
  %h3
    %a(href="#compass-env") compass-env()
  .details
    %p
      Returns the compass environment for the current compile. (`development` or `production`)

#current-time.helper
  %h3
    %a(href="#current-time") current-time([<span class="arg">$format</span>])
  .details
    :markdown
      Returns the current time when the file is compiled. With no arguments, the time will be
      returned in the format of `08:37:48-06:00`. However, if a `$format` string is provided,
      the time will be printed according to that format. Valid formats are any valid format string
      to [Ruby's strftime function](http://www.ruby-doc.org/core-2.0/Time.html#method-i-strftime).

#current-date.helper
  %h3
    %a(href="#current-date") current-date([<span class="arg">$format</span>])
  .details
    :markdown
      Returns the current date when the file is compiled. With no arguments, the date will be
      returned in the format of `2013-05-13`. However, if a `$format` string is provided,
      the date will be printed according to that format. Valid formats are any valid format string
      to <a href="http://www.ruby-doc.org/core-2.0/Time.html#method-i-strftime">Ruby's strftime function</a>.

#current-source-file.helper
  %h3
    %a(href="#current-source-file") current-source-file([<span class="arg">$absolute</span>])
  .details
    :markdown
      Returns the file name of the Sass file that initiated the compilation.
      If the `$absolute` parameter is set to true, the full path of the stylesheet
      will be returned, otherwise it will be relative to the project's Sass directory.
      When the `$absolute` parameter is omitted, it defaults to false.

#current-output-file.helper
  %h3
    %a(href="#current-output-file") current-output-file([<span class="arg">$absolute</span>])
  .details
    :markdown
      Returns the file name of the CSS file that is being generated.
      If the `$absolute` parameter is set to true, the full path of the stylesheet
      will be returned, otherwise it will be relative to the project's CSS
      stylesheets directory.  When the `$absolute` parameter is omitted, it
      defaults to false.
